Hi all ! 

I had kind of a bug today with :

 ChannelHandlerContext.writeAndFlush(Object, ChannelPromise).

Indeed I had some listeners on my promise, one of them being :

 promise.addListener(ChannelFutureListener.CLOSE);


The problem I encountered is that the promise is completed as soon as the 
WRITE is done, not after the FLUSH operation. So when it comes to the flush 
my channel is closed and I have a NPE...

My question is : Am I doing something wrong, or should the promise be 
completed AFTER the flush ? 

Besides, if I call 

 ChannelHandlerContext.write(Object, ChannelPromise).

it makes sense for the promise to be completed after the write, but with 
writeAndFlush I expected it to be completed and the flush.



Thanks before for your help, and keep the good work :) 

Jonathan

-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/ec9374c8-6616-43dc-9fb6-0ec540687e0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to