working websocket and bootstrap peer reconnection when connection is lost
This commit is contained in:
@@ -139,6 +139,8 @@ function hello2Handler(m:Hello2Message, socket:WebSocket) {
|
||||
peerSockets.set(m.peer_id, socket); // TODO:MAYBEBUG - what happens with multiple windows each with their own websocket?
|
||||
socketPeers.set(socket, m.peer_id);
|
||||
|
||||
console.log(userPeers.get(m.user_id));
|
||||
|
||||
if (!m.is_bootstrap_peer) {
|
||||
|
||||
return JSON.stringify({ type: 'hello2', bootstrapPeers: [...bootstrapPeers.values()] });
|
||||
|
||||
Reference in New Issue
Block a user