Merge remote-tracking branch 'origin/jetty-9.3.x' into jetty-9.4.x
This commit is contained in:
commit
18d87aa972
|
@ -75,7 +75,7 @@ public abstract class AbstractConnectHandlerTest
|
||||||
protected Socket newSocket() throws IOException
|
protected Socket newSocket() throws IOException
|
||||||
{
|
{
|
||||||
Socket socket = new Socket("localhost", proxyConnector.getLocalPort());
|
Socket socket = new Socket("localhost", proxyConnector.getLocalPort());
|
||||||
socket.setSoTimeout(5000);
|
socket.setSoTimeout(20000);
|
||||||
return socket;
|
return socket;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,11 +18,9 @@
|
||||||
|
|
||||||
package org.eclipse.jetty.proxy;
|
package org.eclipse.jetty.proxy;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
|
|
|
@ -234,4 +234,23 @@ public abstract class AbstractLifeCycle implements LifeCycle
|
||||||
@Override public void lifeCycleStopped(LifeCycle event) {}
|
@Override public void lifeCycleStopped(LifeCycle event) {}
|
||||||
@Override public void lifeCycleStopping(LifeCycle event) {}
|
@Override public void lifeCycleStopping(LifeCycle event) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A LifeCycle Listener that will call stop if any failures are notified.
|
||||||
|
*/
|
||||||
|
public static final LifeCycle.Listener STOP_ON_FAILURE = new AbstractLifeCycleListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void lifeCycleFailure(LifeCycle lifecycle, Throwable cause)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lifecycle.stop();
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
cause.addSuppressed(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue