Fix dropping the first websocket message
This commit is contained in:
parent
3fcd980c23
commit
9de23a967b
2 changed files with 10 additions and 8 deletions
|
@ -39147,15 +39147,16 @@ var TextSecureServer = (function() {
|
|||
}.bind(this));
|
||||
},
|
||||
registerSecondDevice: function(setProvisioningUrl, confirmNumber, progressCallback) {
|
||||
var socket = this.server.getProvisioningSocket();
|
||||
socket.onclose = function(e) {
|
||||
console.log('websocket closed', e.code);
|
||||
};
|
||||
var createAccount = this.createAccount.bind(this);
|
||||
var generateKeys = this.generateKeys.bind(this, 100, progressCallback);
|
||||
var registerKeys = this.server.registerKeys.bind(this.server);
|
||||
var getSocket = this.server.getProvisioningSocket.bind(this.server);
|
||||
return textsecure.protocol_wrapper.createIdentityKeyRecvSocket().then(function(cryptoInfo) {
|
||||
return new Promise(function(resolve) {
|
||||
var socket = getSocket();
|
||||
socket.onclose = function(e) {
|
||||
console.log('websocket closed', e.code);
|
||||
};
|
||||
var wsr = new WebSocketResource(socket, {
|
||||
keepalive: { path: '/v1/keepalive/provisioning' },
|
||||
handleRequest: function(request) {
|
||||
|
|
|
@ -31,15 +31,16 @@
|
|||
}.bind(this));
|
||||
},
|
||||
registerSecondDevice: function(setProvisioningUrl, confirmNumber, progressCallback) {
|
||||
var socket = this.server.getProvisioningSocket();
|
||||
socket.onclose = function(e) {
|
||||
console.log('websocket closed', e.code);
|
||||
};
|
||||
var createAccount = this.createAccount.bind(this);
|
||||
var generateKeys = this.generateKeys.bind(this, 100, progressCallback);
|
||||
var registerKeys = this.server.registerKeys.bind(this.server);
|
||||
var getSocket = this.server.getProvisioningSocket.bind(this.server);
|
||||
return textsecure.protocol_wrapper.createIdentityKeyRecvSocket().then(function(cryptoInfo) {
|
||||
return new Promise(function(resolve) {
|
||||
var socket = getSocket();
|
||||
socket.onclose = function(e) {
|
||||
console.log('websocket closed', e.code);
|
||||
};
|
||||
var wsr = new WebSocketResource(socket, {
|
||||
keepalive: { path: '/v1/keepalive/provisioning' },
|
||||
handleRequest: function(request) {
|
||||
|
|
Loading…
Reference in a new issue