Dev-tech-network Archive

List Statistics

  • Total Threads: 109
  • Total Posts: 40

Phrases Used to Find This Thread

  #1  
19-06-2012 04:08 PM
Dev-tech-network member admin is online now
User
 

On Tuesday, March 23, 2010 8:21:46 AM UTC-7, Clement Duval wrote:
> Hey
> guys, I'm using an nsiServerSocket from a Firefox Addon, and I've
> noticed that it has problems with suspend/resume on OSX and
> occasionally Windows, but not Linux.
>
> On platforms like OSX,
> after a suspend/resume the ServerSocket is often just gone, but the
> onStopListening callback is never called.  So there's no way to know
> this.
>
> As a workaround, I've been trying to close the
> nsiSeverSocket when I get a sleep_notification event, and then
> re-create it when I get a wake_notification event.  Closing it on
> sleep_notification seems to go fine, but when I try to create it again
> on wake_notification I get:
>
> Error: [Exception... "Component returned failure code: 0xc1f30001
> (NS_ERROR_NOT_INITIALIZED) [nsIServerSocket.asyncListen]" nsresult:
> "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame ::
> The
> function that I'm calling to create it looks like this:
>
> LocalProxy.prototype.constructServerSocket = function() {
>  
> this.serverSocket =
> Components.classes["@mozilla.org/network/server-socket;1"].createInstance(Components.interfaces.nsIServerSocket);
>  
>   this.serverSocket.init(-1,true,-1);
>   this.serverSocket.asyncListen(this);
> };
>
> ...so
> I am calling init, and it works fine when I'm not doing it from a
> wake_notification handler.  Any insight into what's amiss here?
>
> Thanks,
>
> - Clement

Hello. My addon is getting hammered by this as well. Did you ever find a work-around? Thanks

_______________________________________________
dev-tech-network mailing list
dev-tech-
https://lists.mozilla.org/listinfo/dev-tech-network
)





NewsArc Lists  |  Culture Pages   |  Computing Archive  |  Media-Pages
Link to this page on your blog or website by copying the HTML code below and pasting it into your site: