Strange 'receive' from socket.
Vlad Dumitrescu XX (LN/EAB)
Mon May 16 13:00:40 CEST 2005
Looking at this output,
31> client_test:go("10.10.10.8", 19, 3).
#Port<0.144> [unknown] :
we can see that the opened socket is #Port<0.144>, while the received message is from #Port<0.143>. Thus the behaviour is corect, since the message isn't from the right socket.
I interpret this as being the result of running several tests in the same receiver process, and the previous socket did have some data already sent when it was closed. So the message was already in the receiver process' queue, where it was picked by the next run.
In order to not get this effect, you can either call go in a separate process, or flush the message queue between runs.
after 0 ->
More information about the erlang-questions