Explorar o código

Reconnect if peer-connection is not open

Robin Linus %!s(int64=9) %!d(string=hai) anos
pai
achega
21db255386
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      app/elements/p2p-network/p2p-network.html

+ 2 - 1
app/elements/p2p-network/p2p-network.html

@@ -109,8 +109,9 @@
                         console.log(err);
                         if (err.message.indexOf('Connection is not open') > -1) {
                             console.error('Handle this error!!', err);
+                            this.connectToPeer(requestedPeer, callback);
                         }
-                    });
+                    }.bind(this));
 
                     //files channel
                     var f = this._peer.connect(requestedPeer, {