Skip to content

Commit 919cc07

Browse files
committed
close channel when write fails before read
Signed-off-by: dorjesinpo <[email protected]>
1 parent 820da96 commit 919cc07

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/groups/bmq/bmqimp/bmqimp_application.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ void Application::channelStateCallback(
288288
BALL_LOG_ERROR << id() << "Could not establish session with '"
289289
<< endpoint << "' [event: " << event
290290
<< ", status: " << status << "]";
291+
if (channel) {
292+
channel->close(status);
293+
}
291294
} break; // BREAK
292295
default: {
293296
BALL_LOG_ERROR << id() << "Session with '" << endpoint << "' is now"

0 commit comments

Comments
 (0)