mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-13 18:51:01 +00:00
tweak timeout a little as it was changing to 1000000 on the 5th try on return from switch_interval_time_from_timeval on OpenBSD
This commit is contained in:
parent
4a1a40b104
commit
6eda1c0f04
@ -165,15 +165,15 @@ static int get_pmp_pubaddr(char *pub_addr)
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
struct timeval timeout = { 1, 0 };
|
struct timeval timeout = { 1, 0 };
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Checking for PMP %d/%d\n", i, max);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Checking for PMP %d/%d\n", i, max);
|
||||||
|
|
||||||
if ((r = getnatpmprequesttimeout(&natpmp, &timeout)) < 0) {
|
if ((r = getnatpmprequesttimeout(&natpmp, &timeout)) < 0) {
|
||||||
err = "get timeout failed";
|
err = "get timeout failed";
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
pflags = switch_wait_sock(natpmp.s, switch_interval_time_from_timeval(&timeout), SWITCH_POLL_READ | SWITCH_POLL_ERROR | SWITCH_POLL_HUP);
|
pflags = switch_wait_sock(natpmp.s, 1000, SWITCH_POLL_READ | SWITCH_POLL_ERROR | SWITCH_POLL_HUP);
|
||||||
|
|
||||||
if ((pflags & SWITCH_POLL_ERROR) || (pflags & SWITCH_POLL_HUP)) {
|
if ((pflags & SWITCH_POLL_ERROR) || (pflags & SWITCH_POLL_HUP)) {
|
||||||
err = "wait sock failed";
|
err = "wait sock failed";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user