FS-10762: [freeswitch-core] Websocket logic error

This commit is contained in:
Anthony Minessale
2017-11-13 13:49:23 -06:00
committed by Muteesa Fred
parent 1064bb043c
commit c5e662c9bc
4 changed files with 26 additions and 12 deletions
+6 -4
View File
@@ -448,8 +448,10 @@ ssize_t ws_raw_write(wsh_t *wsh, void *data, size_t bytes)
ssl_err = 0;
}
} while (--sanity > 0 && wsh->block && wrote < bytes);
} while (--sanity > 0 && wrote < bytes);
if (!sanity) ssl_err = 56;
if (ssl_err) {
r = ssl_err * -1;
}
@@ -469,9 +471,9 @@ ssize_t ws_raw_write(wsh_t *wsh, void *data, size_t bytes)
if (wsh->block) {
if (sanity < WS_WRITE_SANITY * 3 / 4) {
ms = 60;
ms = 50;
} else if (sanity < WS_WRITE_SANITY / 2) {
ms = 10;
ms = 25;
}
}
ms_sleep(ms);
@@ -483,7 +485,7 @@ ssize_t ws_raw_write(wsh_t *wsh, void *data, size_t bytes)
}
}
} while (--sanity > 0 && wsh->block && wrote < bytes);
} while (--sanity > 0 && wrote < bytes);
//if (r<0) {
//printf("wRITE FAIL: %s\n", strerror(errno));