TCP/IP open Socket problem

Javier París Fernández paris@REDACTED
Wed Oct 26 20:31:03 CEST 2005


Hi,

On Wed, Oct 26, 2005 at 05:03:54PM +0200, Lokesh Naidu wrote:
>    Hi,
> 
>    TCP/IP client in Erlang communicates with a Server. Some times when the
>    connection is lost b/w Client and Server., the socket from the Server side
>    remains open. Client socket is closed using gen_tcp:close function. Also
>    the port is free(checked using netstat).  Now new Socket can't be opened
>    with the same port no. from the client.   Is it possible to close the
>    previous session from Client (Server side socket )? 

You would have to force an RST message, which I don't think it's
possible from userspace. However, is is normal TCP behaviour that
you cannot open a new connection with the same port numbers in a
short time, to prevent confusion between old and new connections.

In your case it would be easier to just make the client use another
port.

Best Regards,
Javier.



More information about the erlang-questions mailing list