Author: elecharny
Date: Fri Feb 10 13:23:46 2012
New Revision: 1242756
URL: http://svn.apache.org/viewvc?rev=1242756&view=rev
Log:
Fix for DIRMINA-887 : we should have a 'continue', not a 'break' if the session
is null.
Modified:
mina/branches/2.0/mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoAcceptor.java
Modified:
mina/branches/2.0/mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoAcceptor.java
URL:
http://svn.apache.org/viewvc/mina/branches/2.0/mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoAcceptor.java?rev=1242756&r1=1242755&r2=1242756&view=diff
==============================================================================
---
mina/branches/2.0/mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoAcceptor.java
(original)
+++
mina/branches/2.0/mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoAcceptor.java
Fri Feb 10 13:23:46 2012
@@ -83,12 +83,12 @@ public abstract class AbstractPollingIoA
/** A flag set when the acceptor has been created and initialized */
private volatile boolean selectable;
- /** The thread responsible of accepting incoming requests */
+ /** The thread responsible of accepting incoming requests */
private AtomicReference<Acceptor> acceptorRef = new
AtomicReference<Acceptor>();
protected boolean reuseAddress = false;
- /**
+ /**
* Define the number of socket that can wait to be accepted. Default
* to 50 (as in the SocketServer default).
*/
@@ -142,8 +142,8 @@ public abstract class AbstractPollingIoA
*
* @param sessionConfig
* the default configuration for the managed {@link IoSession}
- * @param processor the {@link IoProcessor}Â for processing the {@link
IoSession} of this transport, triggering
- * events to the bound {@link IoHandler} and processing the
chains of {@link IoFilter}
+ * @param processor the {@link IoProcessor}Â for processing the {@link
IoSession} of this transport, triggering
+ * events to the bound {@link IoHandler} and processing the
chains of {@link IoFilter}
*/
protected AbstractPollingIoAcceptor(IoSessionConfig sessionConfig,
IoProcessor<S> processor) {
@@ -163,8 +163,8 @@ public abstract class AbstractPollingIoA
* @param executor
* the {@link Executor} used for handling asynchronous
execution of I/O
* events. Can be <code>null</code>.
- * @param processor the {@link IoProcessor}Â for processing the {@link
IoSession} of this transport, triggering
- * events to the bound {@link IoHandler} and processing the
chains of {@link IoFilter}
+ * @param processor the {@link IoProcessor}Â for processing the {@link
IoSession} of this transport, triggering
+ * events to the bound {@link IoHandler} and processing the
chains of {@link IoFilter}
*/
protected AbstractPollingIoAcceptor(IoSessionConfig sessionConfig,
Executor executor, IoProcessor<S> processor) {
@@ -184,11 +184,11 @@ public abstract class AbstractPollingIoA
* @param executor
* the {@link Executor} used for handling asynchronous
execution of I/O
* events. Can be <code>null</code>.
- * @param processor the {@link IoProcessor}Â for processing the {@link
IoSession} of
- * this transport, triggering events to the bound {@link IoHandler} and
processing
+ * @param processor the {@link IoProcessor}Â for processing the {@link
IoSession} of
+ * this transport, triggering events to the bound {@link IoHandler} and
processing
* the chains of {@link IoFilter}
- * @param createdProcessor tagging the processor as automatically created,
so it
- * will be automatically disposed
+ * @param createdProcessor tagging the processor as automatically created,
so it
+ * will be automatically disposed
*/
private AbstractPollingIoAcceptor(IoSessionConfig sessionConfig,
Executor executor, IoProcessor<S> processor,
@@ -226,13 +226,13 @@ public abstract class AbstractPollingIoA
/**
* Initialize the polling system, will be called at construction time.
- * @throws Exception any exception thrown by the underlying system calls
+ * @throws Exception any exception thrown by the underlying system calls
*/
protected abstract void init() throws Exception;
/**
* Destroy the polling system, will be called when this {@link IoAcceptor}
- * implementation will be disposed.
+ * implementation will be disposed.
* @throws Exception any exception thrown by the underlying systems calls
*/
protected abstract void destroy() throws Exception;
@@ -276,7 +276,7 @@ public abstract class AbstractPollingIoA
/**
* Accept a client connection for a server socket and return a new {@link
IoSession}
* associated with the given {@link IoProcessor}
- * @param processor the {@link IoProcessor} to associate with the {@link
IoSession}
+ * @param processor the {@link IoProcessor} to associate with the {@link
IoSession}
* @param handle the server handle
* @return the created {@link IoSession}
* @throws Exception any exception thrown by the underlying systems calls
@@ -322,7 +322,7 @@ public abstract class AbstractPollingIoA
startupAcceptor();
// As we just started the acceptor, we have to unblock the select()
- // in order to process the bind request we just have added to the
+ // in order to process the bind request we just have added to the
// registerQueue.
wakeup();
@@ -437,8 +437,8 @@ public abstract class AbstractPollingIoA
}
if (selected > 0) {
- // We have some connection request, let's process
- // them here.
+ // We have some connection request, let's process
+ // them here.
processHandles(selectedHandles());
}
@@ -501,7 +501,7 @@ public abstract class AbstractPollingIoA
S session = accept(processor, handle);
if (session == null) {
- break;
+ continue;
}
initSession(session, null, null);