Skip to content

Commit

Permalink
fix(@libp2p/webrtc): use correct udp port in remote address (libp2p#2055
Browse files Browse the repository at this point in the history
)

Use the UDP port in the remote address parsed from the last successful
ICE candidate.
  • Loading branch information
achingbrain authored and maschad committed Sep 26, 2023
1 parent f282216 commit f5eaa7e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,5 @@ function parseRemoteAddress (sdp: string): string {
return '/webrtc'
}

return `/dnsaddr/${candidateParts[4]}/${candidateParts[2].toLowerCase()}/${candidateParts[3]}/webrtc`
return `/dnsaddr/${candidateParts[4]}/${candidateParts[2].toLowerCase()}/${candidateParts[5]}/webrtc`
}

0 comments on commit f5eaa7e

Please sign in to comment.