Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions iocore/net/UnixNetVConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1394,8 +1394,9 @@ UnixNetVConnection::migrateToCurrentThread(Continuation *cont, EThread *t)
hold_con.move(this->con);
SSLNetVConnection *sslvc = dynamic_cast<SSLNetVConnection *>(this);

SSL *save_ssl = (sslvc) ? sslvc->ssl : nullptr;
if (save_ssl) {
SSL *save_ssl = nullptr;
if (sslvc) {
save_ssl = sslvc->ssl;
SSLNetVCDetach(sslvc->ssl);
sslvc->ssl = nullptr;
}
Expand All @@ -1409,7 +1410,7 @@ UnixNetVConnection::migrateToCurrentThread(Continuation *cont, EThread *t)
// Create new VC:
UnixNetVConnection *netvc = nullptr;
if (save_ssl) {
SSLNetVConnection *sslvc = static_cast<SSLNetVConnection *>(sslNetProcessor.allocate_vc(t));
sslvc = static_cast<SSLNetVConnection *>(sslNetProcessor.allocate_vc(t));
if (sslvc->populate(hold_con, cont, save_ssl) != EVENT_DONE) {
sslvc->do_io_close();
sslvc = nullptr;
Expand All @@ -1427,6 +1428,9 @@ UnixNetVConnection::migrateToCurrentThread(Continuation *cont, EThread *t)
netvc->set_context(get_context());
}
}
if (netvc) {
netvc->options = this->options;
}
// Do not mark this closed until the end so it does not get freed by the other thread too soon
this->do_io_close();
return netvc;
Expand Down