]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
SimpleMessenger: init_local_connection whenever my_inst changes
authorSamuel Just <sam.just@inktank.com>
Sat, 1 Feb 2014 04:07:54 +0000 (20:07 -0800)
committerSamuel Just <sam.just@inktank.com>
Mon, 17 Feb 2014 22:24:55 +0000 (14:24 -0800)
This is necessary to correctly handle messages to self.

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/msg/SimpleMessenger.cc

index ef97b015adbcab986afead3b88e803421e9d6e19..78e0e69835b670a337fa82f1f6c3aca096c3c24d 100644 (file)
@@ -147,6 +147,7 @@ void SimpleMessenger::set_addr_unknowns(entity_addr_t &addr)
     int port = my_inst.addr.get_port();
     my_inst.addr.addr = addr.addr;
     my_inst.addr.set_port(port);
+    init_local_connection();
   }
 }
 
@@ -294,8 +295,10 @@ int SimpleMessenger::start()
   assert(!started);
   started = true;
 
-  if (!did_bind)
+  if (!did_bind) {
     my_inst.addr.nonce = nonce;
+    init_local_connection();
+  }
 
   lock.Unlock();