Courtesy of jGuru :-
http://www.jguru.com/faq/view.jsp?EID=33897
This suggests that the option and values currently used in BaseChannel
are correct; I read this piece and have assumed it was correct.
> Perhaps it would be nice that BaseChannel could be set to close
> connections gracefully or not calling a method.
From the above page:-
"
Linger set to true and linger time==0
No more receives or sends can be issued on the socket. The socket
send and receive buffers are both discarded. This means that if the OS
has data internally for the socket this data is not sent and not
received by the other end. The close() method returns immediately and
clears the send buffer in background.
"
I wonder...
...could the server have been blocking on a receive (expecting more data
from you) at the point of closure?
I am grasping at straws and only a trace of the network exchanges may
tell us. Is the problem easily repeatable, could 'we' do a trace - of
both ends?
--
Mark
> That is interesting, and makes me wonder if something else is at play
> here...
>
> Courtesy of jGuru :-
>
> http://www.jguru.com/faq/view.jsp?EID=33897
>
Nice pointer. I wonder if using a non-zero value for the linger time
could do too, i.e:
socket.setSoLinger (true, 5);
Marcel, can you give it a try?
> > I found no way of doing this with JPOS(is there one?), instead I had
> > to override the closeSocket() method on BaseChannel to close th
> > socket gracefully changing this line:
> >
> > socket.setSoLinger (true, 0); to
> > socket.setSoLinger (false, 0);
> >
> > This change made it work perfectly.
> That is interesting, and makes me wonder if something else is at play
> here...
>
> Courtesy of jGuru :-
>
> http://www.jguru.com/faq/view.jsp?EID=33897
>
That is a good question. I wonder what this server might do with that
result?
A network trace of both ends could make interesting 'reading'.
--
Mark