Skip to content
Snippets Groups Projects
Commit 192b5956 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

No discon msg if not connected

parent 36897d97
No related branches found
No related tags found
No related merge requests found
......@@ -204,7 +204,7 @@ void Peer::rawClose() {
void Peer::close(bool retry) {
// Attempt to inform about disconnect
if (sock_->is_valid()) { send("__disconnect__"); }
if (sock_->is_valid() && status_ == NodeStatus::kConnected) { send("__disconnect__"); }
UNIQUE_LOCK(send_mtx_, lk_send);
//UNIQUE_LOCK(recv_mtx_, lk_recv);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment