[erlang-questions] A question on EINVAL in active-mode TCP

Magnus Ottenklinger magnus.ottenklinger@REDACTED
Fri Jul 1 09:01:04 CEST 2016


> Von: James Fish <james@REDACTED>
> Gesendet: Donnerstag, 30. Juni 2016 16:58
> An: Jesper Louis Andersen
> Cc: Magnus Ottenklinger; erlang-questions@REDACTED
> Betreff: Re: [erlang-questions] A question on EINVAL in active-mode TCP
> 
> I believe the race condition occurring is that the gen_tcp port will exit after it sends a {tcp_closed, Socket} message when in active mode.

Yes, I think that is exactly what happens. Thanks for pointing that out.

It seems that I am able to `receive {tcp_closed,Sock}` after `EINVAL`, so it should be possible to recover from the error by selectively receiving `tcp_closed`.


More information about the erlang-questions mailing list