From: Michael Jerris Date: Mon, 23 Jun 2008 15:56:24 +0000 (+0000) Subject: attempt to fix MODEVENT-25 (WSAWOULDBLOCK error on socket send in windows) X-Git-Tag: v1.0.1~347 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f70ef86f8f37fecd06f95758ba86d05b966293b;p=thirdparty%2Ffreeswitch.git attempt to fix MODEVENT-25 (WSAWOULDBLOCK error on socket send in windows) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8818 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_apr.c b/src/switch_apr.c index 50da0fe4b3..9ad6e25133 100644 --- a/src/switch_apr.c +++ b/src/switch_apr.c @@ -564,9 +564,10 @@ SWITCH_DECLARE(switch_status_t) switch_socket_send(switch_socket_t *sock, const switch_size_t req = *len, wrote = 0, need = *len; int to_count = 0; - while ((wrote < req && status == SWITCH_STATUS_SUCCESS) || (need == 0 && status == SWITCH_STATUS_BREAK)) { + while ((wrote < req && status == SWITCH_STATUS_SUCCESS) || (need == 0 && status == SWITCH_STATUS_BREAK) || status == 730035) { need = req - wrote; - if ((status = apr_socket_send(sock, buf + wrote, &need)) == SWITCH_STATUS_BREAK) { + status = apr_socket_send(sock, buf + wrote, &need); + if (status == SWITCH_STATUS_BREAK || status == 730035) { if (++to_count > 10000) { status = SWITCH_STATUS_FALSE; break;