equal
deleted
inserted
replaced
115 iServer.AddSessionL( this ); |
115 iServer.AddSessionL( this ); |
116 |
116 |
117 // This could leave if a session is created while the store is unavailable. |
117 // This could leave if a session is created while the store is unavailable. |
118 TRAPD( err, iServer.MessageStoreL().ObserveL( this ) ); |
118 TRAPD( err, iServer.MessageStoreL().ObserveL( this ) ); |
119 |
119 |
120 if( err != KErrNone ) |
120 // We need to leave the Session active in the case of KErrInUse. This is |
|
121 // because if the observer is dropped during KErrInUse, they cannot |
|
122 // re-establish connection, and they will not know when MS in no longer busy. |
|
123 // As a result, they will retry for many seconds to connect, then permanently |
|
124 // give up. This is avoided by trapping KErrInUse. |
|
125 // Thus, only dropSession and Leave for other errors |
|
126 |
|
127 if( err != KErrNone && err != KErrInUse ) |
121 { |
128 { |
122 iServer.DropSession( this ); |
129 iServer.DropSession( this ); |
123 User::Leave( err ); |
130 User::Leave( err ); |
124 } |
131 } |
125 |
132 |