renproject / aw

A flexible P2P networking library for upgradable distributed systems.
MIT License
38 stars 18 forks source link

Fix/channel tests #75

Closed loongy closed 3 years ago

loongy commented 3 years ago

This PR makes several fixes for the channels.

  1. It removes the ability to do foreground draining on replaced connections. This was causing sporadic failures in tests, because TCP connections can get themselves into "half closed" states. We also do not actually use this feature.
  2. Draining readers did not respect sync messages. Now it does.
  3. Readers could get blocked on decoding from the underlying connection if the connection was replaced at that same moment. This is now handled correctly, and blocking no longer occurs.