Closed ghost closed 10 years ago
not ready for review yet
@EasonLiao it's ready for review now
I remember we discussed before, now if we clear the transport, only sender will be removed, not receiver. Let's say A has B in receiver map, B crashed and A doesn't detect that, when B tries connect A again since B is in receiver map A will reject B's connection. Is there a good way to fix this?
We can discuss it tomorrow.
Thanks @m1ch1 , it would be great if we can fix our buggy transport.
when B crashes, A will detect it because the socket gets closed.
when B crashes, A will detect it because the socket gets closed.
I believe this is true for most of cases. But for some cases probably this is not (e.g. the ethernet cable gets unplugged suddenly).
http://stackoverflow.com/questions/14010194/detecting-socket-disconnection
How about when B connects A again and B is already in A's receiver map we just replace it directly?
implementing a tie-breaking logic is error-prone due to netty's asynchronous nature. i think the code would be much simpler if we use two sockets for each peer, one for sending and the other for receiving.