We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent caaa0fd commit 13f6dc1Copy full SHA for 13f6dc1
src/net.cpp
@@ -950,7 +950,13 @@ size_t CConnman::SocketSendData(CNode& node)
950
if (!node.m_sock) {
951
break;
952
}
953
- nBytes = node.m_sock->Send(reinterpret_cast<const char*>(data.data()) + node.nSendOffset, data.size() - node.nSendOffset, MSG_NOSIGNAL | MSG_DONTWAIT);
+ int flags = MSG_NOSIGNAL | MSG_DONTWAIT;
954
+#ifdef MSG_MORE
955
+ if (it + 1 != node.vSendMsg.end()) {
956
+ flags |= MSG_MORE;
957
+ }
958
+#endif
959
+ nBytes = node.m_sock->Send(reinterpret_cast<const char*>(data.data()) + node.nSendOffset, data.size() - node.nSendOffset, flags);
960
961
if (nBytes > 0) {
962
node.m_last_send = GetTime<std::chrono::seconds>();
0 commit comments