Closed SonnyAD closed 3 years ago
By Problem 2, you mean this one? https://github.com/hypercore-protocol/p2p-multiwriter-with-autobase/tree/main/problems/02
I think the stream might be closing the stdin/stdout on socket close actually. Try doing encryptedSocket.on('data', (data) => process.stdout.write(data)) and process.stdin.on('data', (data) => encryptedSocket.write(data)) instead
Works good thanks.
Hi, I was testing Problem 2 again, and I noticed with 3 peers in Problem 2 that if one of the peer disconnect, then the lest 2 peers can't discuss anymore. Do you have any ideas why?