[Jslib] isAlive in sockets.js

Nick P nick.pend at gmail.com
Fri Feb 22 20:31:24 PST 2008

What is the status of the isAlive function in sockets.js?

I saw this piece of documentation:

    // We really should call _transport.isAlive (?) but that is never
    // (either always false or always true).
    // Experimentation shows that calls to available() or isAlive() will not

    // catch any problems with the connection until the javascript call
    // stack has completely unwound.

and I noticed that when rajeev posted a fix for some socket behavior, it
included pulling out the isAlive call.  (
http://mozdev.org/pipermail/jslib/2007-December/000917.html)  Should isAlive
be used?

I'm trying to debug some odd behavior  and am wondering if it is related to
this.  Specifically, I have some code using sockets.js that shows this
when i run it repeatedly in jsliblive in Firefox, occasionally it hits a
streak where after the socket.open is called, socket.isAlive() fails.  It
might do this 7 times, and then I will have a streak where it works

When we moved it out of Firefox and into a xulrunner app, it started failing
on isAlive() every time.

Any insight on the use of isAlive would be appreciated - and if you have any
ideas about the weird bug described above, please chime in!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mozdev.org/pipermail/jslib/attachments/20080222/5d4c04e7/attachment.html 

More information about the Jslib mailing list