提交 88ce7dae authored 作者: Anthony Minessale's avatar Anthony Minessale

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

上级 137fb49d
...@@ -630,7 +630,7 @@ ssize_t ws_read_frame(wsh_t *wsh, ws_opcode_t *oc, uint8_t **data) ...@@ -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); 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) { if (wsh->datalen == -2) {
return -2; return -2;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论