mirror of
https://github.com/schoebel/mars
synced 2025-01-26 01:03:35 +00:00
net: disable MSG_DONTWAIT
This commit is contained in:
parent
2bdc298224
commit
b60b0887e8
@ -510,11 +510,7 @@ int mars_recv_raw(struct mars_socket *msock, void *buf, int minlen, int maxlen)
|
||||
struct msghdr msg = {
|
||||
.msg_iovlen = 1,
|
||||
.msg_iov = (struct iovec*)&iov,
|
||||
#if 0 // There seems to be a race in the kernel: sometimes kernel_recvmsg() blocks forever on a shutdown socket even when sk->sk_rcvtimeo is set. Workaround by using noblocking IO (although it is conceptually broken and may lead to unnecessary throughput degradation)
|
||||
.msg_flags = 0 | MSG_WAITALL | MSG_NOSIGNAL,
|
||||
#else
|
||||
.msg_flags = 0 | MSG_DONTWAIT | MSG_NOSIGNAL,
|
||||
#endif
|
||||
.msg_flags = MSG_NOSIGNAL,
|
||||
};
|
||||
struct socket *sock = msock->s_socket;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user