File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -572,7 +572,10 @@ export default class XmppConnection extends Listenable {
572572
573573 const responseShard = response . headers . get ( 'x-jitsi-shard' ) ;
574574
575- if ( responseShard !== shard ) {
575+ ! responseShard && logger . warn ( 'No x-jitsi-shard header present in keep-alive response' ) ;
576+
577+ // Ignore if no shard header is present.
578+ if ( responseShard && responseShard !== shard ) {
576579 logger . error (
577580 `Detected that shard changed from ${ shard } to ${ responseShard } ` ) ;
578581 this . eventEmitter . emit ( XmppConnection . Events . CONN_SHARD_CHANGED ) ;
Original file line number Diff line number Diff line change @@ -352,11 +352,13 @@ export default class XMPP extends Listenable {
352352 /* eslint-enable camelcase */
353353
354354 if ( this . options . testing ?. enableGracefulReconnect ) {
355+ logger . debug ( 'Shard changed, attempting graceful reconnect' ) ;
355356 this . eventEmitter . emit (
356357 JitsiConnectionEvents . CONNECTION_FAILED ,
357358 JitsiConnectionErrors . SHARD_CHANGED_ERROR
358359 ) ;
359360 } else {
361+ logger . error ( 'Shard changed, kicking the user off the conference and forcing reload' , JSON . stringify ( details ) ) ;
360362 this . eventEmitter . emit (
361363 JitsiConnectionEvents . CONNECTION_FAILED ,
362364 JitsiConnectionErrors . OTHER_ERROR ,
You can’t perform that action at this time.
0 commit comments