I am implementing a server that accepts many concurrent connections.
I used this structure:
loop(Sock) ->
case gen_tcp:accept(Sock) of
{ok, CSock} ->
fork_handling_process(CSock);
{error, Reason} ->
do_something_else();
end,
loop(Sock).
I am wondering if someone sends me a SYN but never sends me a SYN ACK in response to my server ACK, will my server be blocked forever by this client since I call gen_tcp: accept without timeout?
By the way, I think this situation is difficult to imitate, so please let me know if you have any ways to try.
thanks in advance.
source
share