mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hl.0074 <hl.0...@gmail.com>
Subject Why Mina IOSession can not send message sometimes?
Date Sat, 28 Sep 2013 04:42:03 GMT
hi
i found a problem with mina these days,sometimes,IOSession.write(Object) can't write the message
as i expected,the writeFuture.isWritten is false when write operationComplete ,here is some
code in my project i wrote:

public void sendMessage(SocketMessage sm){
System.out.println("client send.....");
WriteFuture wf = this.ioSession.write(sm);
wf.addListener(new IoFutureListener<IoFuture>() {

@Override
public void operationComplete(IoFuture future) {

if (!((WriteFuture) future).isWritten()) {
System.out.println("writen false...");
sendMessage(sm);
} else {
        System.out.println("writen success....");
}
}
}

sometimes i got the logs like this,



it has been resend 300+ times,but this situation is not offten appears,is it a bug or i miss
something ?

thanks
2013-09-28 12:39







hl.0074
Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message