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

This commit is contained in:
Anthony Minessale committed 2017-04-21 15:43:40 -05:00
1 parent acdf1d93db
commit c922223541
4 files changed
+22 -4

No files matched your search

+7 -1
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));