diff options
Diffstat (limited to 'src/network/socket_handler.cpp')
-rw-r--r-- | src/network/socket_handler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/socket_handler.cpp b/src/network/socket_handler.cpp index eb427b8..d774927 100644 --- a/src/network/socket_handler.cpp +++ b/src/network/socket_handler.cpp @@ -183,7 +183,8 @@ void SocketHandler::on_send() // unconsting the content of s is ok, sendmsg will never modify it msg_iov[msg.msg_iovlen].iov_base = const_cast<char*>(s.data()); msg_iov[msg.msg_iovlen].iov_len = s.size(); - msg.msg_iovlen++; + if (++msg.msg_iovlen == UIO_FASTIOV) + break; } ssize_t res = ::sendmsg(this->socket, &msg, MSG_NOSIGNAL); if (res < 0) |