*update dist

This commit is contained in:
Derrick Hammer 2023-04-16 17:17:49 -04:00
parent 9cb6d0b6e4
commit f3e5cebe45
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 10 additions and 8 deletions

View File

@ -164,6 +164,7 @@ class MultiSocketProxy extends proxy_js_1.default {
decode: this._server ? compact_encoding_1.json.decode : socketEncoding.decode,
},
async onmessage(m) {
if (self._server) {
if (self._allowedPorts.length &&
!self._allowedPorts.includes(m.port)) {
self.get(await self._getPublicKey(peer)).messages.errorSocket.send({
@ -172,9 +173,10 @@ class MultiSocketProxy extends proxy_js_1.default {
});
return;
}
}
m = m;
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;
}
const socket = self._sockets.get(m.id);