Offline presence does not work properly

Hi,

I am trying to check the users presence before sending message.

Scenario: Client A logins and Client B is offline Client A checks for presence of Client B.It shows correctly as unavailable

Client B is now logged in,the presence shows available hence sends the message.Now Client B logsout,the presence of client B still shows available.

I found a JIRA which says this is fixed in version 3.0.3 (JIRA 219).

Code

connection.getRoster();

roster.createEntry(toHost,toHost,null)

****roster.getPresence(tohost)