File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const series = require('async/series')
10
10
const PeerBook = require ( 'peer-book' )
11
11
const Switch = require ( 'libp2p-switch' )
12
12
const Ping = require ( 'libp2p-ping' )
13
+ const WebSockets = require ( 'libp2p-websockets' )
13
14
14
15
const peerRouting = require ( './peer-routing' )
15
16
const contentRouting = require ( './content-routing' )
@@ -129,8 +130,7 @@ class Node extends EventEmitter {
129
130
if ( transport . filter ( multiaddrs ) . length > 0 ) {
130
131
this . switch . transport . add (
131
132
transport . tag || transport . constructor . name , transport )
132
- } else if ( transport . constructor &&
133
- transport . constructor . name === 'WebSockets' ) {
133
+ } else if ( WebSockets . isWebSockets ( transport ) ) {
134
134
// TODO find a cleaner way to signal that a transport is always
135
135
// used for dialing, even if no listener
136
136
ws = transport
You can’t perform that action at this time.
0 commit comments