提交 6f70ef86 authored 作者: Michael Jerris's avatar Michael Jerris

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
上级 8a53aad2
......@@ -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;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论