diff -r ae34e1715e21 -r a8c646b56683 emailservices/emailstore/message_store/server/src/MessageStoreSession.cpp --- a/emailservices/emailstore/message_store/server/src/MessageStoreSession.cpp Thu Aug 05 21:09:09 2010 +0300 +++ b/emailservices/emailstore/message_store/server/src/MessageStoreSession.cpp Mon Aug 23 23:32:31 2010 +0300 @@ -117,7 +117,14 @@ // This could leave if a session is created while the store is unavailable. TRAPD( err, iServer.MessageStoreL().ObserveL( this ) ); - if( err != KErrNone ) + // We need to leave the Session active in the case of KErrInUse. This is + // because if the observer is dropped during KErrInUse, they cannot + // re-establish connection, and they will not know when MS in no longer busy. + // As a result, they will retry for many seconds to connect, then permanently + // give up. This is avoided by trapping KErrInUse. + // Thus, only dropSession and Leave for other errors + + if( err != KErrNone && err != KErrInUse ) { iServer.DropSession( this ); User::Leave( err );