mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2024-12-14 11:58:02 +00:00
parent
300ccf3218
commit
3fd4e277d3
1 changed files with 5 additions and 2 deletions
|
@ -739,8 +739,11 @@ void Replica::CloseSocket() {
|
|||
unique_lock lk(sock_mu_);
|
||||
if (sock_) {
|
||||
sock_->proactor()->Await([this] {
|
||||
auto ec = sock_->Shutdown(SHUT_RDWR);
|
||||
LOG_IF(ERROR, ec) << "Could not shutdown socket " << ec;
|
||||
if (sock_->IsOpen()) {
|
||||
auto ec = sock_->Shutdown(SHUT_RDWR);
|
||||
LOG_IF(ERROR, ec) << "Could not shutdown socket " << ec;
|
||||
sock_->Close();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue