*update dist
This commit is contained in:
parent
9cb6d0b6e4
commit
f3e5cebe45
|
@ -164,6 +164,7 @@ class MultiSocketProxy extends proxy_js_1.default {
|
||||||
decode: this._server ? compact_encoding_1.json.decode : socketEncoding.decode,
|
decode: this._server ? compact_encoding_1.json.decode : socketEncoding.decode,
|
||||||
},
|
},
|
||||||
async onmessage(m) {
|
async onmessage(m) {
|
||||||
|
if (self._server) {
|
||||||
if (self._allowedPorts.length &&
|
if (self._allowedPorts.length &&
|
||||||
!self._allowedPorts.includes(m.port)) {
|
!self._allowedPorts.includes(m.port)) {
|
||||||
self.get(await self._getPublicKey(peer)).messages.errorSocket.send({
|
self.get(await self._getPublicKey(peer)).messages.errorSocket.send({
|
||||||
|
@ -172,9 +173,10 @@ class MultiSocketProxy extends proxy_js_1.default {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
m = m;
|
m = m;
|
||||||
if (self._server) {
|
if (self._server) {
|
||||||
new self.socketClass(nextSocketId(), m, self, self.get(await self._getPublicKey(peer)), m).connect();
|
new self.socketClass(nextSocketId(), m.id, self, self.get(await self._getPublicKey(peer)), m).connect();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const socket = self._sockets.get(m.id);
|
const socket = self._sockets.get(m.id);
|
||||||
|
|
Loading…
Reference in New Issue