|
@@ -299,7 +299,9 @@ Peer.prototype.destroy = function() {
|
|
*/
|
|
*/
|
|
Peer.prototype.disconnect = function() {
|
|
Peer.prototype.disconnect = function() {
|
|
if (!this.disconnected) {
|
|
if (!this.disconnected) {
|
|
- this._socket.close();
|
|
|
|
|
|
+ if (!!this._socket) {
|
|
|
|
+ this._socket.close();
|
|
|
|
+ }
|
|
this.id = null;
|
|
this.id = null;
|
|
this.disconnected = true;
|
|
this.disconnected = true;
|
|
}
|
|
}
|