haskell-distributed / network-transport-tcp

TCP Realisation of Network.Transport
http://haskell-distributed.github.com
BSD 3-Clause "New" or "Revised" License
30 stars 27 forks source link

Fix possible endless waiting on the 'crossed' MVar #81

Closed andriytk closed 5 years ago

andriytk commented 5 years ago

It is possible that the ConnectionRequestCrossed message may never come from the other side, so we should unblock the endless waiting on the "crossed" MVar in this case.

facundominguez commented 5 years ago

Hello Andriy. Thanks for sending a fix. I'm struggling to recover the context of the problem. Can you point me at the code where a process is blocking indefinitely on reading the crossed MVar?

facundominguez commented 5 years ago

Oh, I got it. This can occur when no timeout is given.

facundominguez commented 5 years ago

LGTM