james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1049817 - /james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractChannelUpstreamHandler.java
Date Thu, 16 Dec 2010 08:42:05 GMT
Author: norman
Date: Thu Dec 16 08:42:05 2010
New Revision: 1049817

URL: http://svn.apache.org/viewvc?rev=1049817&view=rev
Log:
Guard from NPE

Modified:
    james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractChannelUpstreamHandler.java

Modified: james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractChannelUpstreamHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractChannelUpstreamHandler.java?rev=1049817&r1=1049816&r2=1049817&view=diff
==============================================================================
--- james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractChannelUpstreamHandler.java
(original)
+++ james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractChannelUpstreamHandler.java
Thu Dec 16 08:42:05 2010
@@ -136,7 +136,9 @@ public abstract class AbstractChannelUps
     @Override
     public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception
{
         ProtocolSession session = (ProtocolSession) attributes.get(ctx.getChannel());
-        session.getLogger().info("Connection closed for " + session.getRemoteHost() + " ("
+ session.getRemoteIPAddress()+ ")");
+        if (session != null) {
+            session.getLogger().info("Connection closed for " + session.getRemoteHost() +
" (" + session.getRemoteIPAddress()+ ")");
+        }
         cleanup(ctx.getChannel());
 
         super.channelClosed(ctx, e);



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message