libp2p / go-libp2p-examples

Example libp2p applications
MIT License
338 stars 145 forks source link

Add persistence to the code #57

Closed matheusroleal closed 4 years ago

matheusroleal commented 5 years ago

Right now, using the chat example, we shut down all the nodes if you kill one of them. Does anyone knows how to relay the info in Peer Store to connected nodes automatically if one node dies ? ( So they can connect to each other)

upperwal commented 5 years ago

@matheusroleal This should not happen. You might be panicking or exiting on a read error. So when you kill 1 node, others will receive error on the read stream and if you panic, other nodes will exit. Just log the message and don't panic or exit.