[Project_owners] Problems (Inability) closing HTTP nsIChannel from JS

Alexander Sack asac at jwsdot.com
Thu Nov 4 15:00:23 EST 2004


Hi,

I have to problems/questions using js:

1. I have a problem with using http protocol nsIChannel. I use the 
asyncOpen to open it.
It appears to work fine, until I do it about 8-10 times. Then it gets 
stuck. Using netstat shows that
there are 4 sockets in state CLOSE_WAIT with 1 byte left to read.
So, I suspect that I ran out of channels somehow. Now, how can I close a 
channel cleanly? I tried cancel in onStopRequest, but without success :(

2. I am currently wondering whether there are some special concurrency 
issues to take care of when processing input from asyncOpen, etc. I want 
to make modifications to XUL and RDF Datasources. Is the API 
thread-safe? Is mozilla in fact multi threaded? If not, how can I 
schedule GUI modification commands, so they get executed in the gui 
event thread?

Thanks in advance

-- 
 GPG messages preferred. |  .''`.  ** Debian GNU/Linux **
 Alexander Sack          | : :' :      The  universal
 asac at jwsdot.com         | `. `'      Operating System
 http://www.jwsdot.com/  |   `-    http://www.debian.org/



More information about the Project_owners mailing list