|
|
@@ -435,15 +435,34 @@ JingleSessionPC.prototype.sendSessionAccept = function (localSDP,
|
|
435
|
435
|
// Calling tree() to print something useful
|
|
436
|
436
|
accept = accept.tree();
|
|
437
|
437
|
logger.info("Sending session-accept", accept);
|
|
438
|
|
-
|
|
|
438
|
+ var self = this;
|
|
439
|
439
|
this.connection.sendIQ(accept,
|
|
440
|
440
|
success,
|
|
441
|
|
- this.newJingleErrorHandler(accept, failure),
|
|
|
441
|
+ this.newJingleErrorHandler(accept, function (error) {
|
|
|
442
|
+ failure(error);
|
|
|
443
|
+ // 'session-accept' is a critical timeout and we'll have to restart
|
|
|
444
|
+ self.room.eventEmitter.emit(XMPPEvents.SESSION_ACCEPT_TIMEOUT);
|
|
|
445
|
+ }),
|
|
442
|
446
|
IQ_TIMEOUT);
|
|
443
|
447
|
// XXX Videobridge needs WebRTC's answer (ICE ufrag and pwd, DTLS
|
|
444
|
448
|
// fingerprint and setup) ASAP in order to start the connection
|
|
445
|
449
|
// establishment.
|
|
446
|
|
- this.connection.flush();
|
|
|
450
|
+ //
|
|
|
451
|
+ // FIXME Flushing the connection at this point triggers an issue with BOSH
|
|
|
452
|
+ // request handling in Prosody on slow connections.
|
|
|
453
|
+ //
|
|
|
454
|
+ // The problem is that this request will be quite large and it may take time
|
|
|
455
|
+ // before it reaches Prosody. In the meantime Strophe may decide to send
|
|
|
456
|
+ // the next one. And it was observed that a small request with
|
|
|
457
|
+ // 'transport-info' usually follows this one. It does reach Prosody before
|
|
|
458
|
+ // the previous one was completely received. 'rid' on the server is
|
|
|
459
|
+ // increased and Prosody ignores the request with 'session-accept'. It will
|
|
|
460
|
+ // never reach Jicofo and everything in the request table is lost. Removing
|
|
|
461
|
+ // the flush does not guarantee it will never happen, but makes it much less
|
|
|
462
|
+ // likely('transport-info' is bundled with 'session-accept' and any
|
|
|
463
|
+ // immediate requests).
|
|
|
464
|
+ //
|
|
|
465
|
+ // this.connection.flush();
|
|
447
|
466
|
};
|
|
448
|
467
|
|
|
449
|
468
|
/**
|