Skip to content

Commit

Permalink
Merge pull request #1552 from nextcloud/backport/1549/stable14
Browse files Browse the repository at this point in the history
[stable14] Delay message sending when socket is null
  • Loading branch information
Ivansss authored Feb 18, 2019
2 parents e42c547 + 6b9393a commit 4d85246
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/signaling.js
Original file line number Diff line number Diff line change
Expand Up @@ -859,9 +859,9 @@
};

OCA.Talk.Signaling.Standalone.prototype.doSend = function(msg, callback) {
if (!this.connected && msg.type !== "hello") {
// Defer sending any messages until the hello rsponse has been
// received.
if (!this.connected && msg.type !== "hello" || this.socket === null) {
// Defer sending any messages until the hello response has been
// received and when the socket is open
this.pendingMessages.push([msg, callback]);
return;
}
Expand Down

0 comments on commit 4d85246

Please sign in to comment.