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:
Matias Alejo Garcia 2014-07-07 15:55:46 -03:00
commit 2626414771
3 changed files with 2 additions and 16 deletions

View file

@ -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);