Author: elecharny
Date: Sat Jan 16 15:33:04 2010
New Revision: 899978

URL: http://svn.apache.org/viewvc?rev=899978&view=rev
Log:
o Removed a dead portion of code. There is no way the notified flag can be 
'true' in the catch section, when its value is set to true just before the 
catch.

Modified:
    
mina/trunk/core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoProcessor.java

Modified: 
mina/trunk/core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoProcessor.java
URL: 
http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoProcessor.java?rev=899978&r1=899977&r2=899978&view=diff
==============================================================================
--- 
mina/trunk/core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoProcessor.java
 (original)
+++ 
mina/trunk/core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoProcessor.java
 Sat Jan 16 15:33:04 2010
@@ -517,7 +517,6 @@
      */
     private boolean addNow(T session) {
         boolean registered = false;
-        boolean notified = false;
 
         try {
             init(session);
@@ -532,26 +531,15 @@
             // Propagate the SESSION_CREATED event up to the chain
             IoServiceListenerSupport listeners = ((AbstractIoService) 
session.getService()).getListeners();
             listeners.fireSessionCreated(session);
-            
-            notified = true;
         } catch (Throwable e) {
-            if (notified) {
-                // Clear the DefaultIoFilterChain.CONNECT_FUTURE attribute
-                // and call ConnectFuture.setException().
-                scheduleRemove(session);
-                IoFilterChain filterChain = session.getFilterChain();
-                filterChain.fireExceptionCaught(e);
-                wakeup();
-            } else {
-                ExceptionMonitor.getInstance().exceptionCaught(e);
-                
-                try {
-                    destroy(session);
-                } catch (Exception e1) {
-                    ExceptionMonitor.getInstance().exceptionCaught(e1);
-                } finally {
-                    registered = false;
-                }
+            ExceptionMonitor.getInstance().exceptionCaught(e);
+            
+            try {
+                destroy(session);
+            } catch (Exception e1) {
+                ExceptionMonitor.getInstance().exceptionCaught(e1);
+            } finally {
+                registered = false;
             }
         }
         


Reply via email to