We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ae56b6 commit eba2cd3Copy full SHA for eba2cd3
lib/server/swarm.js
@@ -153,6 +153,8 @@ class Swarm {
153
if (!peer) continue
154
if (isWebRTC && peer.peerId === ownPeerId) continue // don't send peer to itself
155
if ((isWebRTC && peer.type !== 'ws') || (!isWebRTC && peer.type === 'ws')) continue // send proper peer type
156
+ // 如果端口号不是0-65535, continue
157
+ if (peer.port > 65535 || peer.port < 0) continue
158
peers.push(peer)
159
}
160
return peers
0 commit comments