[omniORB-dev] Re: OO 4.0.5 SSL shutdown deadlock & patch

Jonathan Biggar jon at levanta.com
Mon Apr 11 15:58:00 BST 2005


Jonathan Biggar wrote:
> Here's a patch that works around the problem by making sslEndpoint::Poke 
> set a timeout on the call to sslAddress::Connect.  If the timeout 
> happens, you'll get the error message "Warning: Fail to connect to 
> myself", but that's far better than a deadlock.

Turns out that patch was inadequately tested.  It would work when other 
clients were still trying to connect to the server, but not when the 
server was idle.  This patch does it right:

--- sslEndpoint.cc.orig 2004-10-18 04:47:02.000000000 -0700
+++ sslEndpoint.cc      2005-04-11 14:48:41.000000000 -0700
@@ -329,7 +329,10 @@

    sslAddress* target = new sslAddress(pd_address,pd_ctx);
    giopActiveConnection* conn;
-  if ((conn = target->Connect()) == 0) {
+  unsigned long abs_secs, abs_nanosecs;
+
+  omni_thread::get_time(&abs_secs, &abs_nanosecs, 1, 0);
+  if ((conn = target->Connect(abs_secs, abs_nanosecs)) == 0) {
      if (omniORB::trace(1)) {
        omniORB::logger log;
        log << "Warning: Fail to connect to myself ("


-- 
Jon Biggar
Levanta
jon at levanta.com




More information about the omniORB-dev mailing list