Re: [nodejs] Any event for half socket close? socket.write not writing to the socket.

109 views
Skip to first unread message

Ben Noordhuis

unread,
Sep 27, 2012, 9:07:25 AM9/27/12
to nod...@googlegroups.com
On Thu, Sep 27, 2012 at 10:16 AM, anup <anup.k...@gmail.com> wrote:
> There is something strange happening with socket.write().
>
> While the socket is open, I can receive data on the socket, socket.write is
> apparently stops pushing data on the socket. There is no error event on the
> socket as well.
>
> This is happening on node version v0.6.17. Happens very intermittently in a
> few sockets out of around 600 connected sockets that are exchanging data.
> Did anyone else face this too?
>
> I am suspecting that the socket may be half open. Is there a way to identify
> this in node? Is there any event that will be fired if the socket is half
> closed or half open?

You should post some code. It's impossible to tell what's going on.
Also, it might not hurt to test your code with v0.8.

anup

unread,
Oct 19, 2012, 11:40:47 AM10/19/12
to nod...@googlegroups.com
Thanks Ben for the response. I know this is a bit late and I am sorry for that.

The issue was somewhere else. tcpdump nailed it. It was hard to simulate and when it happened, tcpdump suggested that the packet did reach the other end of the socket.

There was nothing special about the code. It was socket.write(). Other socket related code was scattered all around so I did not know what to add here.

However, it is solved now. There is no issue at node. 

Thanks once again.  


--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Ben Noordhuis

unread,
Oct 20, 2012, 8:27:45 AM10/20/12
to nod...@googlegroups.com
On Fri, Oct 19, 2012 at 5:40 PM, anup <anup.k...@gmail.com> wrote:
> Thanks Ben for the response. I know this is a bit late and I am sorry for
> that.
>
> The issue was somewhere else. tcpdump nailed it. It was hard to simulate and
> when it happened, tcpdump suggested that the packet did reach the other end
> of the socket.
>
> There was nothing special about the code. It was socket.write(). Other
> socket related code was scattered all around so I did not know what to add
> here.
>
> However, it is solved now. There is no issue at node.
>
> Thanks once again.

Glad you got it solved. :-)
Reply all
Reply to author
Forward
0 new messages