Fix bug for platform which does not have SOCK_NONBLOCK
This commit is contained in:
parent
05b3c9e914
commit
232f15fb56
|
@ -953,7 +953,7 @@ int create_nonblock_udp_socket(int family) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#else // !SOCK_NONBLOCK
|
#else // !SOCK_NONBLOCK
|
||||||
auto fd = socket(family, SOCK_STREAM, 0);
|
auto fd = socket(family, SOCK_DGRAM, 0);
|
||||||
|
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue