Strange 'receive' from socket.
Mon May 16 13:08:04 CEST 2005
Oh, I hadn't noticed that!! Thank you!
On 5/16/05, Vlad Dumitrescu XX (LN/EAB) <> wrote:
> Looking at this output,
> 31> client_test:go("10.10.10.8", 19, 3).
> Opened #Port<0.144>
> #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.
> flush() ->
> _ ->
> after 0 ->
> best regards,
More information about the erlang-questions