Commit 3be98bf7 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Added timeout waiting for ACK when in syncrhonous mode. JM-993

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/branches@7531 b35dd754-fafc-0310-a699-88a17e54d16e
parent 6cff7ae8
......@@ -236,7 +236,12 @@ public class NIOConnection implements Connection {
ioSession.write(buffer);
}
else {
ioSession.write(buffer).join();
// Send stanza and wait for ACK (using a 2 seconds default timeout)
boolean ok =
ioSession.write(buffer).join(JiveGlobals.getIntProperty("connection.ack.timeout", 2000));
if (!ok) {
Log.warn("No ACK was received when sending stanza to: " + this.toString());
}
}
}
catch (Exception e) {
......
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