Commit cb4a461d authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fixed concurrency issue with writeStarted that was making the server...

Fixed concurrency issue with writeStarted that was making the server incorrectly assume that a connection was dead. JM-650

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3792 b35dd754-fafc-0310-a699-88a17e54d16e
parent 1374f70f
......@@ -393,12 +393,13 @@ public class SocketConnection implements Connection {
*/
boolean checkHealth() {
// Check that the sending operation is still active
if (writeStarted > -1 && System.currentTimeMillis() - writeStarted >
long writeTimestamp = writeStarted;
if (writeTimestamp > -1 && System.currentTimeMillis() - writeTimestamp >
JiveGlobals.getIntProperty("xmpp.session.sending-limit", 60000)) {
// Close the socket
if (Log.isDebugEnabled()) {
Log.debug("Closing connection: " + this + " that started sending data at: " +
new Date(writeStarted));
new Date(writeTimestamp));
}
forceClose();
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment