@freesignal/protocol 0.8.2 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node.js +3 -3
- package/package.json +1 -1
package/dist/node.js
CHANGED
|
@@ -253,12 +253,12 @@ export class FreeSignalNode {
|
|
|
253
253
|
const encrypted = EncryptedDatagram.from(datagram);
|
|
254
254
|
if (!encrypted.payload)
|
|
255
255
|
throw new Error("Missing payload");
|
|
256
|
-
|
|
257
|
-
return;
|
|
256
|
+
const handshakeState = yield this.openHandshake(datagram);
|
|
258
257
|
const session = yield this.sessions.get(encrypted.sessionTag);
|
|
259
258
|
if (!session)
|
|
260
259
|
throw new Error("Session not found for sessionTag: " + encrypted.sessionTag);
|
|
261
|
-
|
|
260
|
+
if (handshakeState === 'syn')
|
|
261
|
+
yield this.sendHandshake(session);
|
|
262
262
|
this.emitter.emit('handshake', { session });
|
|
263
263
|
return;
|
|
264
264
|
}
|