Skip to content

Commit 39bfb2a

Browse files
authored
Removed the unneeded lines for setting invocation exception in the async_write handler since in the next line it closes the connection, which in turn will set the exception on the invocation anyway. (#866)
1 parent 3394981 commit 39bfb2a

File tree

1 file changed

+0
-12
lines changed
  • hazelcast/include/hazelcast/client/internal/socket

1 file changed

+0
-12
lines changed

hazelcast/include/hazelcast/client/internal/socket/BaseSocket.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,22 +116,10 @@ namespace hazelcast {
116116
auto handler = [=](const boost::system::error_code &ec,
117117
std::size_t bytes_written) {
118118
if (ec) {
119-
auto invocationIt = connection->invocations.find(message_call_id);
120-
121-
assert(invocationIt != connection->invocations.end());
122-
123119
auto message = (boost::format{
124120
"Error %1% during invocation write for %2% on connection %3%"} %
125121
ec % *invocation % *connection).str();
126-
invocationIt->second->notify_exception(
127-
boost::enable_current_exception(
128-
std::make_exception_ptr(
129-
exception::io(
130-
"Connection::write",
131-
message))));
132-
133122
connection->close(message);
134-
connection->invocations.erase(invocationIt);
135123
}
136124
};
137125

0 commit comments

Comments
 (0)