One of the gen_servers generators in my application is gen_tcp: listen (Port, [{active, true}]) . The first time I run the unit test, it returns {ok, Socket}, but the second time I run the same unit test, it returns {error, eaddrinuse}, but
lsof -i TCP
returns nothing. In addition, when the same unit_test is run twice on another computer (WinXP), it works as expected (i.e. returns {ok, Socket) both times). So my gen_server obviously frees up the port, but Erlang somehow doesn't know this.
So, how can I understand who, according to Erlang, is using this address?
source share