Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/rtRemoteSocketUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,14 @@ rtSendDocument(rapidjson::Document const& doc, int fd, sockaddr_storage const* d
flags = MSG_NOSIGNAL;
#endif

int limit = 100;
while (sendmsg (fd, &msg, flags) < 0)
{
if (errno == EINTR)
if ((errno == EINTR) && --limit)
{
rtLogWarn("sending message interrupted, repeating. %d attempts left", limit);
continue;
}
rtError e = rtErrorFromErrno(errno);
rtLogError("failed to send message. %s", rtStrError(e));
return e;
Expand Down