message-io icon indicating copy to clipboard operation
message-io copied to clipboard

client don't try reconnect

Open 2547409617 opened this issue 1 year ago • 4 comments

hi, I run ping pong example, first run server and then run client, all is ok. I kill server, and run server again, client don't try reconnect. I hope client will try reconnect if network is disconnect.

2547409617 avatar Feb 18 '24 08:02 2547409617

Remove reconnect=5 from the example.

hschneider avatar Feb 18 '24 08:02 hschneider

Hi, I guess you're using Tcp or FramedTcp right? The way it works is how TCP works.

TCP does know about reconnections. Once the channel is closed by one side (i.e, when you kill the server), the connection is considered closed for the other endpoint. If you want a reconnection mechanism, you should implement this on top of Tcp by yourself. i.e, trying to connect again after some incremental period or similar.

lemunozm avatar Feb 19 '24 07:02 lemunozm