mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
FS-6969 #resolve #comment This patch should accomplish the same and handle other platforms, please test
This commit is contained in:
@@ -2567,6 +2567,12 @@ SWITCH_DECLARE(int) switch_wait_sock(switch_os_socket_t sock, uint32_t ms, switc
|
||||
|
||||
s = poll(pfds, 1, ms);
|
||||
|
||||
if (s < 0) {
|
||||
if (switch_errno_is_break(switch_errno())) {
|
||||
s = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (s < 0) {
|
||||
r = s;
|
||||
} else if (s > 0) {
|
||||
@@ -2645,6 +2651,12 @@ SWITCH_DECLARE(int) switch_wait_socklist(switch_waitlist_t *waitlist, uint32_t l
|
||||
|
||||
s = poll(pfds, len, ms);
|
||||
|
||||
if (s < 0) {
|
||||
if (switch_errno_is_break(switch_errno())) {
|
||||
s = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (s < 0) {
|
||||
r = s;
|
||||
} else if (s > 0) {
|
||||
@@ -2758,6 +2770,12 @@ SWITCH_DECLARE(int) switch_wait_sock(switch_os_socket_t sock, uint32_t ms, switc
|
||||
|
||||
s = select(sock + 1, (flags & SWITCH_POLL_READ) ? rfds : NULL, (flags & SWITCH_POLL_WRITE) ? wfds : NULL, (flags & SWITCH_POLL_ERROR) ? efds : NULL, &tv);
|
||||
|
||||
if (s < 0) {
|
||||
if (switch_errno_is_break(switch_errno())) {
|
||||
s = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (s < 0) {
|
||||
r = s;
|
||||
} else if (s > 0) {
|
||||
@@ -2858,6 +2876,12 @@ SWITCH_DECLARE(int) switch_wait_socklist(switch_waitlist_t *waitlist, uint32_t l
|
||||
|
||||
s = select(max_fd + 1, (flags & SWITCH_POLL_READ) ? rfds : NULL, (flags & SWITCH_POLL_WRITE) ? wfds : NULL, (flags & SWITCH_POLL_ERROR) ? efds : NULL, &tv);
|
||||
|
||||
if (s < 0) {
|
||||
if (switch_errno_is_break(switch_errno())) {
|
||||
s = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (s < 0) {
|
||||
r = s;
|
||||
} else if (s > 0) {
|
||||
|
Reference in New Issue
Block a user