New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
msg/simple: fix missing unlock when already bind #13267
Conversation
Signed-off-by: Haomai Wang <haomai@xsky.com>
caused by #12901 |
hi, @yuyuyu101
|
src/msg/simple/SimpleMessenger.cc
Outdated
@@ -312,6 +312,7 @@ int SimpleMessenger::client_bind(const entity_addr_t &bind_addr) | |||
lock.Lock(); | |||
if (did_bind) { | |||
assert(my_inst.addr == bind_addr); | |||
lock.Unlock(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AsyncMessager::client_bind also need this patch.
thanks, done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm thanks
src/msg/async/AsyncMessenger.cc
Outdated
@@ -396,6 +396,7 @@ int AsyncMessenger::client_bind(const entity_addr_t &bind_addr) | |||
lock.Lock(); | |||
if (did_bind) { | |||
assert(my_inst.addr == bind_addr); | |||
lock.Unlock(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, better off using Mutex::Locker
. or instead switch to std::mutex
, and use std::lock_guard
instead.
Signed-off-by: Haomai Wang <haomai@xsky.com>
7a05e7a
to
067d569
Compare
@tchaikov done |
Signed-off-by: Haomai Wang haomai@xsky.com