[sameplace] How to close "connecting" session on Mac OSX

1 view
Skip to first unread message

sylver

unread,
May 25, 2010, 3:21:13 AM5/25/10
to SamePlace/xmpp4moz
Hi,

How can I close "connecting" session on Mac OSX? I'm trying to make a
reconnect function than tries to reconnect

Code:
===========

channel.on({event:'connector', state:'disconnected'},
function(e){
reconnect(); //will loop
});

function reconnect(){
//if im connecting , stop connecting <-- how to do?

XMPP.up(jid, function(){ //this works fine in windows, but OSX seems
to ignore multiple XMPP.up()?
clearInterval(interval );
return;
});

var interval = setInterval(function(){
reconnect();
}, 2000);
}

Thanks :D

--
Documentation: http://github.com/bard/sameplace/wikis/home
Discussions: http://groups.google.com/group/sameplace
Bug tracker: https://bugs.launchpad.net/sameplace

sylver

unread,
May 25, 2010, 10:38:04 PM5/25/10
to SamePlace/xmpp4moz
Just some codes cleanup :D The setInterval in above post seems
irrelevant.

===============================================

var interval;

channel.on({event:'connector', state:'disconnected'},
function(e){

interval = setInterval(function(){
reconnect();
}, 2000);

Reply all
Reply to author
Forward
0 new messages