Merge remote-tracking branch 'origin/master' into jetty-9.1
Conflicts: jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java
This commit is contained in:
commit
5f02620603
|
@ -232,7 +232,10 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
|
|||
}
|
||||
catch (Exception x)
|
||||
{
|
||||
LOG.info("Exception while notifying connection " + connection, x);
|
||||
if (isRunning())
|
||||
LOG.warn("Exception while notifying connection " + connection, x);
|
||||
else
|
||||
LOG.debug("Exception while notifying connection {}",connection, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -709,19 +709,20 @@ public class JettyRunForkedMojo extends AbstractMojo
|
|||
if (PluginLog.getLog().isDebugEnabled())
|
||||
PluginLog.getLog().debug(Arrays.toString(cmd.toArray()));
|
||||
|
||||
forkedProcess = builder.start();
|
||||
PluginLog.getLog().info("Forked process starting");
|
||||
|
||||
if (waitForChild)
|
||||
{
|
||||
forkedProcess = builder.start();
|
||||
startPump("STDOUT",forkedProcess.getInputStream());
|
||||
startPump("STDERR",forkedProcess.getErrorStream());
|
||||
int exitcode = forkedProcess.waitFor();
|
||||
PluginLog.getLog().info("Forked execution exit: "+exitcode);
|
||||
}
|
||||
else
|
||||
{ //we're not going to be reading the stderr as we're not waiting for the child to finish
|
||||
forkedProcess.getErrorStream().close();
|
||||
{ //merge stderr and stdout from child
|
||||
builder.redirectErrorStream(true);
|
||||
forkedProcess = builder.start();
|
||||
|
||||
//wait for the child to be ready before terminating.
|
||||
//child indicates it has finished starting by printing on stdout the token passed to it
|
||||
|
@ -754,6 +755,7 @@ public class JettyRunForkedMojo extends AbstractMojo
|
|||
{
|
||||
throw new MojoExecutionException ("Problem determining if forked process is ready: "+e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (InterruptedException ex)
|
||||
|
|
|
@ -21,6 +21,7 @@ package org.eclipse.jetty.server;
|
|||
import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.channels.ClosedChannelException;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
|
@ -361,13 +362,13 @@ public class HttpChannel<T> implements HttpParser.RequestHandler<T>, Runnable
|
|||
// Complete generating the response
|
||||
_response.closeOutput();
|
||||
}
|
||||
catch(EofException e)
|
||||
catch(EofException|ClosedChannelException e)
|
||||
{
|
||||
LOG.debug(e);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
LOG.warn("handle complete",e);
|
||||
LOG.warn("complete failed",e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -762,7 +763,7 @@ public class HttpChannel<T> implements HttpParser.RequestHandler<T>, Runnable
|
|||
@Override
|
||||
public void failed(final Throwable x)
|
||||
{
|
||||
if (x instanceof EofException)
|
||||
if (x instanceof EofException || x instanceof ClosedChannelException)
|
||||
{
|
||||
LOG.debug(x);
|
||||
_callback.failed(x);
|
||||
|
|
Loading…
Reference in New Issue