diff --git a/packages/dht/src/connection/Handshaker.ts b/packages/dht/src/connection/Handshaker.ts index f636cf650c..0c2049dd04 100644 --- a/packages/dht/src/connection/Handshaker.ts +++ b/packages/dht/src/connection/Handshaker.ts @@ -11,7 +11,7 @@ import { version as applicationVersion } from '../../package.json' const logger = new Logger(module) interface HandshakerEvents { - handshakeRequest: (source: PeerDescriptor, protocolVersion: string, target?: PeerDescriptor) => void + handshakeRequest: (remote: PeerDescriptor, protocolVersion: string, target?: PeerDescriptor) => void handshakeCompleted: (remote: PeerDescriptor) => void handshakeFailed: (error?: HandshakeError) => void } diff --git a/packages/dht/src/connection/webrtc/WebrtcConnector.ts b/packages/dht/src/connection/webrtc/WebrtcConnector.ts index d5ab1170ee..eab5936cdf 100644 --- a/packages/dht/src/connection/webrtc/WebrtcConnector.ts +++ b/packages/dht/src/connection/webrtc/WebrtcConnector.ts @@ -168,7 +168,7 @@ export class WebrtcConnector { connection.once('localDescription', (description: string) => { remoteConnector.sendRtcAnswer(description, connection.connectionId) }) - handshaker.on('handshakeRequest', (_sourceDescriptor: PeerDescriptor, remoteVersion: string) => { + handshaker.on('handshakeRequest', (_remoteDescriptor: PeerDescriptor, remoteVersion: string) => { if (!isMaybeSupportedProtocolVersion(remoteVersion)) { rejectHandshake(pendingConnection!, connection, handshaker, HandshakeError.UNSUPPORTED_PROTOCOL_VERSION) } else { diff --git a/packages/trackerless-network/src/logic/ContentDeliveryLayerNode.ts b/packages/trackerless-network/src/logic/ContentDeliveryLayerNode.ts index 947983551c..0d1a4db9ce 100644 --- a/packages/trackerless-network/src/logic/ContentDeliveryLayerNode.ts +++ b/packages/trackerless-network/src/logic/ContentDeliveryLayerNode.ts @@ -88,7 +88,7 @@ export class ContentDeliveryLayerNode extends EventEmitter { rpcCommunicator: this.options.rpcCommunicator, markAndCheckDuplicate: (msg: MessageID, prev?: MessageRef) => markAndCheckDuplicate(this.duplicateDetectors, msg, prev), broadcast: (message: StreamMessage, previousNode?: DhtAddress) => this.broadcast(message, previousNode), - onLeaveNotice: (remoteNodeId: DhtAddress, sourceIsStreamEntryPoint: boolean) => { + onLeaveNotice: (remoteNodeId: DhtAddress, remoteIsStreamEntryPoint: boolean) => { if (this.abortController.signal.aborted) { return } @@ -107,7 +107,7 @@ export class ContentDeliveryLayerNode extends EventEmitter { this.options.neighborFinder.start([remoteNodeId]) this.options.proxyConnectionRpcLocal?.removeConnection(remoteNodeId) } - if (sourceIsStreamEntryPoint) { + if (remoteIsStreamEntryPoint) { this.emit('entryPointLeaveDetected') } },