Resource conflict socket exception

I’m having some trouble dealing with multiple logins from XIFF.


  1. Bob logs into Openfire from home using XIFF

  2. Bob forgets to log out at home.

  3. Bob comes to work and logs in again.

His home machine throws the following ActionScript exception:

TypeError: Error #1009: Cannot access a property or method of a null object reference.

at org.jivesoftware.xiff.core::XMPPConnection/org.jivesoftware.xiff.core:XMPPConne ction::socketReceivedData()[C:\projects\XIFF.SVN\src\org\jivesoftware\xiff\core\]

The line in question is:

> var nodeName:String = firstNode.nodeName.toLowerCase();

Basically, firstNode is null because the data property on the DataEvent object passed into socketReceivedData() is empty (it’s a single space, aka " ").

I’m thinking I should edit to process this as a disconnect event. Possibly as a different type of disconnect than exists today, perhaps as a SocketDisconnect. What do you guys think?

Another issue is that I was thinking I could get around this problem by using the conflict policy setting on the Openfire server. But when I set the conflict resolution to “Never Kick”, it still kicks out the old user. AFAIK it should be kicking the new user.

FYI - I got around this issue by assigning a different resource to the two logins.