Merge pull request #830 from yemel/fix/peer-id-taken
Derive token from cid, bring back the custom version of peerjs
This commit is contained in:
commit
2626414771
3 changed files with 2 additions and 16 deletions
|
|
@ -345,6 +345,7 @@ Network.prototype.start = function(opts, openCallback) {
|
|||
|
||||
if (!self.criticalError && self.tries < self.reconnectAttempts) {
|
||||
self.tries++;
|
||||
self.opts.token = util.sha256(self.peerId).toString('hex');
|
||||
self.peer = new Peer(self.peerId, self.opts);
|
||||
self.started = true;
|
||||
self._setupPeerHandlers(openCallback);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue