Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2015-05-12 07:34:36 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-05-12 07:34:36 +0300
commit7963c8902011f22e2392f3678b537c05e684d5bd (patch)
treecf520fdbb609a0f63b56b485fb39564a8a35dc41 /bin
parent016e5333c84dde1928f138e7ee56f79e042b309a (diff)
Fix webrtc crash from command line
Sometimes RTCPeerConnection.getStats() doesn't return an ip:port for peers
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cmd.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/cmd.js b/bin/cmd.js
index f60fe93..d695e95 100755
--- a/bin/cmd.js
+++ b/bin/cmd.js
@@ -530,7 +530,9 @@ function drawTorrent (torrent) {
'{3:%s} {25+magenta:%s} {10:%s} {10+cyan:%s/s} {10+red:%s/s} {15+grey:%s}' +
'{15+cyan:%s}',
progress,
- wire.remoteAddress + ':' + wire.remotePort,
+ wire.remoteAddress
+ ? (wire.remoteAddress + ':' + wire.remotePort)
+ : 'Unknown',
prettyBytes(wire.downloaded),
prettyBytes(wire.downloadSpeed()),
prettyBytes(wire.uploadSpeed()),