Derive token from cid, bring back the custom version of peerjs

This commit is contained in:
Yemel Jardi 2014-07-07 11:29:28 -03:00
commit f8ea3a4090
3 changed files with 2 additions and 16 deletions

View file

@ -346,6 +346,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);