-
Notifications
You must be signed in to change notification settings - Fork 140
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
Fix[MWC]: ntc channel execute after close #465
Conversation
b834872
to
f89e093
Compare
@@ -356,7 +356,8 @@ class NtcChannel : public mwcio::Channel, | |||
/// this channel for the write to succeed. | |||
void write(Status* status, | |||
const bdlbb::Blob& blob, | |||
bsls::Types::Int64 watermark) BSLS_KEYWORD_OVERRIDE; | |||
bsls::Types::Int64 watermark = bsl::numeric_limits<int>::max()) | |||
BSLS_KEYWORD_OVERRIDE; |
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.
blazingmq/src/groups/mwc/mwcio/mwcio_channel.h
Lines 178 to 181 in 50018e7
virtual void | |
write(Status* status, | |
const bdlbb::Blob& blob, | |
bsls::Types::Int64 watermark = bsl::numeric_limits<int>::max()) = 0; |
The interface has default for warermark
@@ -371,7 +372,7 @@ class NtcChannel : public mwcio::Channel, | |||
/// Shutdown this channel, and cancel all pending read requests (but do | |||
/// not invoke them). Pass the specified `status` to any registered | |||
/// `CloseFn`s. | |||
void close(const Status& status) BSLS_KEYWORD_OVERRIDE; | |||
void close(const Status& status = Status()) BSLS_KEYWORD_OVERRIDE; |
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.
virtual void close(const Status& status = Status()) = 0; |
The interface has default for status
201cc9f
to
5a319c8
Compare
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.
Build 319 of commit 5a319c8 has completed with FAILURE
Signed-off-by: Evgeny Malygin <[email protected]>
5a319c8
to
2d89761
Compare
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.
Build 329 of commit 2d89761 has completed with FAILURE
It is possible to call
NtcChannel::execute
afterNtcChannel::close
.close
freesd_streamSocket_sp
, andexecute
didn't check for validity of this field and just dereferences it.