diff --git a/lib/connect.js b/lib/connect.js index d5209445..1767f10a 100644 --- a/lib/connect.js +++ b/lib/connect.js @@ -43,7 +43,7 @@ module.exports = function connect (dht, publicKey, opts = {}) { const keyPair = opts.keyPair || dht.defaultKeyPair const relayThrough = selectRelay(opts.relayThrough || null) const encryptedSocket = (opts.createSecretStream || defaultCreateSecretStream)(true, null, { - publicKey: unslab(keyPair.publicKey), + publicKey: keyPair.publicKey, remotePublicKey: publicKey, autoStart: false, keepAlive: dht.connectionKeepAlive