Skip to content

Commit

Permalink
Fix ssl copy bug (cmu-db#1436)
Browse files Browse the repository at this point in the history
* Fix ssl copy bug

* Update network_io_wrapper_factory.cpp
  • Loading branch information
tli2 authored and pervazea committed Jun 28, 2018
1 parent d22bd24 commit 40acdf6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/network/network_io_wrapper_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ std::shared_ptr<NetworkIoWrapper> NetworkIoWrapperFactory::NewNetworkIoWrapper(
conn_fd, std::make_shared<ReadBuffer>(),
std::make_shared<WriteBuffer>());
reusable_wrappers_[conn_fd] =
std::static_pointer_cast<NetworkIoWrapper, PosixSocketIoWrapper>(
wrapper);
std::static_pointer_cast<NetworkIoWrapper, PosixSocketIoWrapper>(wrapper);
return wrapper;
}

Expand All @@ -52,6 +51,7 @@ Transition NetworkIoWrapperFactory::PerformSslHandshake(
throw NetworkProcessException("Failed to set ssl fd");
io_wrapper =
std::make_shared<SslSocketIoWrapper>(std::move(*io_wrapper), context);
reusable_wrappers_[io_wrapper->sock_fd_] = io_wrapper;
} else {
auto ptr = std::dynamic_pointer_cast<SslSocketIoWrapper, NetworkIoWrapper>(
io_wrapper);
Expand All @@ -75,4 +75,4 @@ Transition NetworkIoWrapperFactory::PerformSslHandshake(
}
}
} // namespace network
} // namespace peloton
} // namespace peloton

0 comments on commit 40acdf6

Please sign in to comment.