Concurrency error may confuse the server and assume that a connection is dead

Description

The instance variable writeStarted in SocketConnection is not thread safe. So while it is being used in SocketConnection#checkHealth it may be modified. Therefore, the server will be confused and will assume that the connection is dead thus closing it.

2006.04.17 13:55:53 Closing connection: org.jivesoftware.wildfire.net.SocketConnection@3b96bb socket: Socket[addr=/138.35.105.1,port=1160,localport=5222] session: org.jivesoftware.wildfire.ClientSession@135b92e status: 3 address: username@jci-jabber/spark id: 6ede9371 presence:
<presence id="7jgmd-1036" from="username@jci-jabber/spark">
<status>Online</status>
<x xmlns="vcard-temp:x:update">
<photo>2ae1ba603119edc85816391e53cfd93e</photo>
</x>
<x xmlns="jabber:x:avatar">
<hash>2ae1ba603119edc85816391e53cfd93e</hash>
</x>
</presence> that started sending data at: Wed Dec 31 16:59:59 MST 1969

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created April 19, 2006 at 5:47 AM
Updated April 19, 2006 at 5:55 AM
Resolved April 19, 2006 at 5:55 AM