We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02cf20b commit 6732545Copy full SHA for 6732545
src/net.cpp
@@ -1512,16 +1512,10 @@ void CConnman::SocketHandler()
1512
}
1513
1514
1515
- //
1516
- // Send
1517
1518
- if (sendSet)
1519
- {
1520
- LOCK(pnode->cs_vSend);
1521
- size_t nBytes = SocketSendData(pnode);
1522
- if (nBytes) {
1523
- RecordBytesSent(nBytes);
1524
- }
+ if (sendSet) {
+ // Send data
+ size_t bytes_sent = WITH_LOCK(pnode->cs_vSend, return SocketSendData(pnode));
+ if (bytes_sent) RecordBytesSent(bytes_sent);
1525
1526
1527
InactivityCheck(pnode);
0 commit comments