Author: norman Date: Sat Sep 17 14:08:52 2011 New Revision: 1171986 URL: http://svn.apache.org/viewvc?rev=1171986&view=rev Log: make sure all buffers are written to the client before close the channel
Modified: james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/BasicChannelUpstreamHandler.java Modified: james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/BasicChannelUpstreamHandler.java URL: http://svn.apache.org/viewvc/james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/BasicChannelUpstreamHandler.java?rev=1171986&r1=1171985&r2=1171986&view=diff ============================================================================== --- james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/BasicChannelUpstreamHandler.java (original) +++ james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/BasicChannelUpstreamHandler.java Sat Sep 17 14:08:52 2011 @@ -27,6 +27,7 @@ import org.apache.james.protocols.api.Pr import org.apache.james.protocols.api.Response; import org.apache.james.protocols.impl.AbstractChannelUpstreamHandler; import org.apache.james.protocols.impl.NettyProtocolTransport; +import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelFutureListener; import org.jboss.netty.channel.ChannelHandler.Sharable; @@ -84,7 +85,7 @@ public class BasicChannelUpstreamHandler if (r != null) { ctx.getChannel().write(r).addListener(ChannelFutureListener.CLOSE); } else { - ctx.getChannel().close(); + ctx.getChannel().write(ChannelBuffers.EMPTY_BUFFER).addListener(ChannelFutureListener.CLOSE); } } if (session != null) { --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org