minor tweak to make ws code work in blocking mode properly when used outside sofia

This commit is contained in:
Anthony Minessale 2014-05-07 06:13:27 +05:00
parent 137fb49dc1
commit 88ce7dae1c
1 changed files with 1 additions and 1 deletions

View File

@ -630,7 +630,7 @@ ssize_t ws_read_frame(wsh_t *wsh, ws_opcode_t *oc, uint8_t **data)
return ws_close(wsh, WS_PROTO_ERR);
}
if ((wsh->datalen = ws_raw_read(wsh, wsh->buffer, 9, WS_NOBLOCK)) < 0) {
if ((wsh->datalen = ws_raw_read(wsh, wsh->buffer, 9, wsh->block)) < 0) {
if (wsh->datalen == -2) {
return -2;
}