Skip to content

Commit 77c67a9

Browse files
authored
(cleanup) consistently SUSPENDED error in connect (#203)
1 parent c339c86 commit 77c67a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/connect.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module.exports = function connect (dht, publicKey, opts = {}) {
4848

4949
// in case a socket is made during suspended state, destroy it immediately
5050
if (dht.suspended) {
51-
encryptedSocket.destroy(new Error('Suspended'))
51+
encryptedSocket.destroy(SUSPENDED())
5252
return encryptedSocket
5353
}
5454

0 commit comments

Comments
 (0)