[omniORB] FW: TCP connection lost

Duncan Grisby duncan at grisby.org
Fri Mar 9 15:06:05 GMT 2007


On Friday 2 March, "Alessandro Ricci" wrote:

> I have been using omniORB for a couple of years now, but never come
> across a problem like this. I need to get a particular exception when my
> TCP connection between client and server is unexpectedly closed. I have
> tried to use setClientCallTimeout to set a global or a punctual timeout
> that wake up the client when server doesn't reply in a reasonable time
> but it is not what I really need. How OmniORB is noticed that the
> connection is lost? Does it wait for socket timeout?
> What I have now is that OmniORB is blocked inside call
> omni:tcpConnection:Recv( pd_socket, (char*)buf, sz,0) where pd_socket is
> a value, buf is a void* different from NULL and sz is another value.
> Other two parameters, pd_deadline_secs and pd_deadline_nanosecos are set
> to 0 by the caller, that is omni:giopStream:inputMessage.

If you don't give omniORB a call timeout, it relies on the TCP stack to
tell it if the connection fails. In your case, TCP isn't reporting any
errors to omniORB, so omniORB doesn't know anything is wrong. Unless you
are sending data across a TCP connection, you don't get to know that it
has broken.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list