You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2010/12/16 09:42:05 UTC
svn commit: r1049817 -
/james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractChannelUpstreamHandler.java
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