librelist archives

« back to archive

Keepalive and prebind together

Keepalive and prebind together

From:
Paweł Ochota
Date:
2014-09-23 @ 09:39
Hi JC!

I think there is a problem with converse when options keepalive and prebind
are true. Sometimes I've got 404 from my ejabberd server. Everything is ok
when I put "return" after this line:

https://github.com/jcbrand/converse.js/blob/5bc1286a648d9fde1d729b93f319f80c63091e4d/converse.js#L4565

If these two options are true, converse duplicates connection.attach.

Greetings.

Re: [conversejs] Keepalive and prebind together

From:
Jc Brand
Date:
2014-09-24 @ 09:02
Hi Paweł 

You're right. I've added the return.

https://github.com/jcbrand/converse.js/commit/b8032675554ad15b74fc5737b40039bc5bba7320

There might be some other issues with using keepalive and prebind together as
well.

For example, when using keepalive, sometimes the connection gets lost and I'm
not sure what'll happen then in the prebind case. It won't reconnect, which is
something I'm planning to add in the future.

So please be aware that "keepalive" is still relatively experimental.

Thanks
JC

On Tue, Sep 23, 2014 at 11:39:40AM +0200, Paweł Ochota wrote:
>    Hi JC!
>    I think there is a problem with converse when options keepalive and
>    prebind are true. Sometimes I've got 404 from my ejabberd server.
>    Everything is ok when I put "return" after this
>    
line: [1]https://github.com/jcbrand/converse.js/blob/5bc1286a648d9fde1d729b93f319f80c63091e4d/converse.js#L4565
>    If these two options are true, converse duplicates connection.attach.
>    Greetings.
> 
> References
> 
>    Visible links
>    1. 
https://github.com/jcbrand/converse.js/blob/5bc1286a648d9fde1d729b93f319f80c63091e4d/converse.js#L4565