Commit a1758282 authored by Guus der Kinderen's avatar Guus der Kinderen

OF-159: Use configured socket timeout value instead of hardcoded number.

parent fbe36af6
...@@ -8,6 +8,7 @@ import org.jivesoftware.openfire.handler.IQPingHandler; ...@@ -8,6 +8,7 @@ import org.jivesoftware.openfire.handler.IQPingHandler;
import org.jivesoftware.openfire.interceptor.InterceptorManager; import org.jivesoftware.openfire.interceptor.InterceptorManager;
import org.jivesoftware.openfire.interceptor.PacketInterceptor; import org.jivesoftware.openfire.interceptor.PacketInterceptor;
import org.jivesoftware.openfire.interceptor.PacketRejectedException; import org.jivesoftware.openfire.interceptor.PacketRejectedException;
import org.jivesoftware.openfire.server.RemoteServerManager;
import org.jivesoftware.openfire.session.OutgoingServerSession; import org.jivesoftware.openfire.session.OutgoingServerSession;
import org.jivesoftware.openfire.session.Session; import org.jivesoftware.openfire.session.Session;
import org.jivesoftware.util.cert.SANCertificateIdentityMapping; import org.jivesoftware.util.cert.SANCertificateIdentityMapping;
...@@ -88,8 +89,8 @@ public class S2STestService { ...@@ -88,8 +89,8 @@ public class S2STestService {
Log.info( "Sending server to server ping request to " + domain ); Log.info( "Sending server to server ping request to " + domain );
XMPPServer.getInstance().getIQRouter().route( pingRequest ); XMPPServer.getInstance().getIQRouter().route( pingRequest );
// Wait for success or exceed socket 5s timeout. // Wait for success or exceed socket timeout.
waitUntil.tryAcquire( 6, TimeUnit.SECONDS ); waitUntil.tryAcquire( RemoteServerManager.getSocketTimeout(), TimeUnit.MILLISECONDS );
// Check on the connection status. // Check on the connection status.
logSessionStatus(); logSessionStatus();
......
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