Chandrashekhar Mullaparthi Chandrashekhar.Mullaparthi@REDACTED
Thu May 24 12:15:33 CEST 2001

In the function prim_inet:send/2, kernel-


send(S, Data) when port(S) ->

    case catch erlang:port_command(S, Data) of

        true ->


                {inet_reply, S, Status} -> Status


        {'EXIT', Reason} -> {error, Reason}



When I'm trying to send some stuff on my socket, erlang:port_command 

is crashing with the error, 

{badarg, [{erlang, port_command, [#Port<0.116>, Data]}]}. 

This seems to indicate that the port is closed.


Wouldn't it be a good idea to close the socket in that case and send a 

tcp_closed message to the controlling process?



This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.

More information about the erlang-questions mailing list