better EINTR handling

This commit is contained in:
z3APA3A committed 2014-06-11 01:54:25 +04:00
1 parent 7bae6c4525
commit 8975b00cce
2 files changed
+9 -5

No files matched your search

+1 -1
View File
@@ -47,7 +47,7 @@ int socksendto(SOCKET sock, struct sockaddr * sin, unsigned char * buf, int bufs
if(res < 1) break;
res = so._sendto(sock, buf + sent, bufsize - sent, 0, sin, SASIZE(sin));
if(res < 0) {
if(errno != EAGAIN) break;
if(errno != EAGAIN && errno != EINTR) break;
continue;
}
sent += res;