* Fix error in multiSocket.ts where 'this' was used instead of 'self' to refer to the current object.
This commit is contained in:
parent
c4c1fd8f6b
commit
339dbba08c
|
@ -200,7 +200,7 @@ export default class MultiSocketProxy extends Proxy {
|
||||||
self._allowedPorts.length &&
|
self._allowedPorts.length &&
|
||||||
!self._allowedPorts.includes((m as TcpSocketConnectOpts).port)
|
!self._allowedPorts.includes((m as TcpSocketConnectOpts).port)
|
||||||
) {
|
) {
|
||||||
self.get(await this._getPublicKey(peer)).messages.errorSocket.send({
|
self.get(await self._getPublicKey(peer)).messages.errorSocket.send({
|
||||||
id: (m as SocketRequest).id,
|
id: (m as SocketRequest).id,
|
||||||
err: new Error(
|
err: new Error(
|
||||||
`port ${(m as TcpSocketConnectOpts).port} not allowed`
|
`port ${(m as TcpSocketConnectOpts).port} not allowed`
|
||||||
|
@ -216,7 +216,7 @@ export default class MultiSocketProxy extends Proxy {
|
||||||
nextSocketId(),
|
nextSocketId(),
|
||||||
m,
|
m,
|
||||||
self,
|
self,
|
||||||
self.get(await this._getPublicKey(peer)) as PeerEntity,
|
self.get(await self._getPublicKey(peer)) as PeerEntity,
|
||||||
m
|
m
|
||||||
).connect();
|
).connect();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue