| 503 | } |
| 504 | |
| 505 | void CNode::CloseSocketDisconnect() |
| 506 | { |
| 507 | fDisconnect = true; |
| 508 | if (hSocket != INVALID_SOCKET) { |
| 509 | LogPrint("net", "disconnecting peer=%d\n", id); |
| 510 | CloseSocket(hSocket); |
| 511 | } |
| 512 | |
| 513 | // in case this fails, we'll empty the recv buffer when the CNode is deleted |
| 514 | TRY_LOCK(cs_vRecvMsg, lockRecv); |
| 515 | if (lockRecv) |
| 516 | vRecvMsg.clear(); |
| 517 | } |
| 518 | |
| 519 | void CNode::PushVersion() |
| 520 | { |
no test coverage detected