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

createTransport doesn't respect the use of "0" as a port number #26

Closed qnikst closed 9 years ago

qnikst commented 9 years ago

See https://cloud-haskell.atlassian.net/browse/DPSLN-9. If we pass "0" as the port (which means "pick an arbitrary free port"), the endpoint addressing will break, because instead of checking which port was actually assigned, we store "0" as our port number. This breaks d-p-simplelocalnet, for example.

The simplest fix would be to disallow "0" as a port number, although that's perhaps not the most user-friendly thing to do.