How tested is djabberd?

Martin Atkins mart at
Mon Jul 3 18:43:41 UTC 2006

Karjala wrote:
> Also, another problem I had with Jabberd v1 was when a modem user hanged 
> up his modem without closing down his jabber connection with the server 
> first, he would appear to be online (and all messages to him would get 
> lost) for around an hour. This was despite me having set some timeout 
> parameter in the config to one minute.
> Is DJabberd better at handling these cases?

 From a quick read of the code (see DJabberd::Connection::ClientIn's 
close method if you are interested) DJabberd sends out an offline 
presence when a client disconnects.

However, I think in the case you're describing the modem is 
disconnecting before the client completes the TCP shutdown, so the 
server can do little about this other than make use of the lack of 
keepalive packets. I'm not sure whether DJabberd ever times out 
connections... I certainly can't spot where it's tracking "last seen" times.

The best way to detect a downed client, I think, is to just send it a 
packet containing just a space as clients do for keep-alive; that way, 
you'll probably get back either a Host Unreachable response or a TCP RST 
packet depending on whether another client has taken up the same IP 
address in the mean time. I don't think DJabberd currently does anything 
like this, either.

More information about the Djabberd mailing list