mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-06-17 19:41:41 +00:00
Additional check
This commit is contained in:
@ -181,8 +181,8 @@ export class Noise implements INoiseConnection {
|
||||
await handshake.exchange();
|
||||
await handshake.finish();
|
||||
|
||||
if (this.useNoisePipes && remotePeer) {
|
||||
KeyCache.store(remotePeer, handshake.getRemoteStaticKey());
|
||||
if (this.useNoisePipes && handshake.remotePeer) {
|
||||
KeyCache.store(handshake.remotePeer, handshake.getRemoteStaticKey());
|
||||
}
|
||||
} catch (e) {
|
||||
throw new Error(`Error occurred during XX handshake: ${e.message}`);
|
||||
|
Reference in New Issue
Block a user