--- a/emailservices/emailstore/message_store/server/src/MessageStoreSession.cpp Wed Aug 18 09:37:47 2010 +0300
+++ b/emailservices/emailstore/message_store/server/src/MessageStoreSession.cpp Thu Sep 02 20:15:00 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 );