diff --git a/src/webrtc-star/index.js b/src/webrtc-star/index.js index 70312a25..aa9eac52 100644 --- a/src/webrtc-star/index.js +++ b/src/webrtc-star/index.js @@ -73,6 +73,10 @@ function WebRTCStar () { connected = true conn.destroy = channel.destroy.bind(channel) + channel.on('close', () => { + conn.destroy() + }) + conn.getObservedAddrs = (callback) => { return callback(null, [ma]) }