who uses a TCP port?
Posted
by
dijxtra
on Stack Overflow
See other posts from Stack Overflow
or by dijxtra
Published on 2011-11-16T15:38:42Z
Indexed on
2011/11/16
17:51 UTC
Read the original article
Hit count: 155
One of gen_servers in my app call gen_tcp:listen(Port, [{active, true}]). First time I run unit test, it returns {ok, Socket}, but second time I run the same unit test, it returns an {error, eaddrinuse}, but
lsof -i TCP
returns nothing. Also, when the same unit_test is run twice on another machine (WinXP), it works as expected (that is, returns {ok, Socket} both times). Therefore, my gen_server obviously releases the port, but Erlang somehow doesn't know that.
So, how can I figure out who does Erlang think uses this address?
© Stack Overflow or respective owner