Permalink
Browse files

412940 minor threadsafe fixes

  • Loading branch information...
gregw committed Jul 15, 2013
1 parent 5d3760b commit cbc0a114f421d2498463a3176c96f58508fdbe34
Showing with 12 additions and 6 deletions.
  1. +12 −6 jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java
@@ -268,10 +268,13 @@ protected void doStart() throws Exception

protected void interruptAcceptors()
{
for (Thread thread : _acceptors)
synchronized (this)
{
if (thread != null)
thread.interrupt();
for (Thread thread : _acceptors)
{
if (thread != null)
thread.interrupt();
}
}
}

@@ -306,9 +309,12 @@ public void join() throws InterruptedException

public void join(long timeout) throws InterruptedException
{
for (Thread thread : _acceptors)
if (thread != null)
thread.join(timeout);
synchronized (this)
{
for (Thread thread : _acceptors)
if (thread != null)
thread.join(timeout);
}
}

protected abstract void accept(int acceptorID) throws IOException, InterruptedException;

0 comments on commit cbc0a11

Please sign in to comment.