FS-10150: [freeswitch-core] Reduce writes to closed ssl sockets -- same fix for non-ssl sockets #resolve

This commit is contained in:
Anthony Minessale 2017-04-21 15:43:40 -05:00
parent acdf1d93db
commit c922223541
4 changed files with 22 additions and 4 deletions

View File

@ -482,7 +482,13 @@ KS_DECLARE(ks_ssize_t) kws_raw_write(kws_t *kws, void *data, ks_size_t bytes)
ks_sleep_ms(ms);
}
} while (--sanity > 0 && ((r == -1 && ks_errno_is_blocking(ks_errno())) || (kws->block && wrote < bytes)));
if (r == -1) {
if (!ks_errno_is_blocking(ks_errno())) {
break;
}
}
} while (--sanity > 0 && kws->block && wrote < bytes);
//if (r<0) {
//printf("wRITE FAIL: %s\n", strerror(errno));

View File

@ -1 +1 @@
Thu Apr 6 17:08:51 CDT 2017
Fri Apr 21 15:42:59 CDT 2017

View File

@ -476,7 +476,13 @@ ssize_t ws_raw_write(wsh_t *wsh, void *data, size_t bytes)
ms_sleep(ms);
}
} while (--sanity > 0 && ((r == -1 && xp_is_blocking(xp_errno())) || (wsh->block && wrote < bytes)));
if (r == -1) {
if (!ks_errno_is_blocking(ks_errno())) {
break;
}
}
} while (--sanity > 0 && kws->block && wrote < bytes);
//if (r<0) {
//printf("wRITE FAIL: %s\n", strerror(errno));

View File

@ -476,7 +476,13 @@ ssize_t ws_raw_write(wsh_t *wsh, void *data, size_t bytes)
ms_sleep(ms);
}
} while (--sanity > 0 && ((r == -1 && xp_is_blocking(xp_errno())) || (wsh->block && wrote < bytes)));
if (r == -1) {
if (!ks_errno_is_blocking(ks_errno())) {
break;
}
}
} while (--sanity > 0 && kws->block && wrote < bytes);
//if (r<0) {
//printf("wRITE FAIL: %s\n", strerror(errno));