Hiya

This is my code

                try {
                    WriteFuture writeFuture = session.write(cachedMessage);
                    writeFuture.addListener(this);
                    writeFuture.awaitUninterruptibly();
                    sentMessage = writeFuture.isWritten();
                } catch (Exception e) {...


Before sending a message, I disconnect the server from the network (pull
 cable) so that the message cannot possibly be sent. However, 
sentMessage will return true anyway. On wiresharks output you can see 
three TCP Retransmissions (and obviously no acks). After a few more 
messages (not the same message as the first) it will realize the link is
 down and return false.

How do I get to know that the message was not sent?

                                          

Reply via email to