[EMAIL PROTECTED] wrote:
> I agree with you. I didn't notice this way.
> Thank you !
>
> But anyway, don't you think, all of the Mina team
> and other people, that when one call the close().join()
> function on a session, one could assume that
> it will wait (with the join() feature) until
> all pending sending messages are really sent ?
>
> For me, my logic is that if I call close().join(),
> it should wait for all messages to be gone.
> As the usual meaning of close (filechannel, stream, ...).
>
>   
I agree with you that calling session.close() should wait until all
pending writes have been written before closing the connection. That
would be more in line with how it works with streams (close() flushes
out everything written before closing the stream) and I think that is
what most users would expect.

However, the way session.close() works currently also has it's uses.
Sometimes you may want to close a session forcefully without flushing
anything. But it might be better to introduce a new method for that like
session.destroy().

WDYT?

-- 
Niklas Therning
Software Architect
www.spamdrain.net

Reply via email to