@@ -213,9 +213,8 @@ export async function ensureOlmSessionsForDevices(
213213 // synchronous operation, as otherwise it is possible to have deadlocks
214214 // where multiple tasks wait indefinitely on another task to update some set
215215 // of common devices.
216- for ( const [ userId , devices ] of Object . entries ( devicesByUser ) ) {
216+ for ( const [ , devices ] of Object . entries ( devicesByUser ) ) {
217217 for ( const deviceInfo of devices ) {
218- const deviceId = deviceInfo . deviceId ;
219218 const key = deviceInfo . getIdentityKey ( ) ;
220219
221220 if ( key === olmDevice . deviceCurve25519Key ) {
@@ -224,15 +223,12 @@ export async function ensureOlmSessionsForDevices(
224223 continue ;
225224 }
226225
227- const forWhom = `for ${ key } (${ userId } :${ deviceId } )` ;
228226 if ( ! olmDevice . _sessionsInProgress [ key ] ) {
229227 // pre-emptively mark the session as in-progress to avoid race
230228 // conditions. If we find that we already have a session, then
231229 // we'll resolve
232- log . debug ( `Marking Olm session in progress ${ forWhom } ` ) ;
233230 olmDevice . _sessionsInProgress [ key ] = new Promise ( resolve => {
234231 resolveSession [ key ] = ( ...args ) => {
235- log . debug ( `Resolved Olm session in progress ${ forWhom } ` ) ;
236232 delete olmDevice . _sessionsInProgress [ key ] ;
237233 resolve ( ...args ) ;
238234 } ;
@@ -266,11 +262,9 @@ export async function ensureOlmSessionsForDevices(
266262 }
267263
268264 const forWhom = `for ${ key } (${ userId } :${ deviceId } )` ;
269- log . debug ( `Ensuring Olm session ${ forWhom } ` ) ;
270265 const sessionId = await olmDevice . getSessionIdForDevice (
271266 key , resolveSession [ key ] , log ,
272267 ) ;
273- log . debug ( `Got Olm session ${ sessionId } ${ forWhom } ` ) ;
274268 if ( sessionId !== null && resolveSession [ key ] ) {
275269 // we found a session, but we had marked the session as
276270 // in-progress, so resolve it now, which will unmark it and
0 commit comments