فهرست منبع

fix: websocket,sent事件从未触发

https://gitee.com/openLuat/LuatOS/issues/IDF0CO
Wendal Chen 2 ماه پیش
والد
کامیت
7f4e48d727
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      components/network/websocket/luat_lib_websocket.c

+ 1 - 1
components/network/websocket/luat_lib_websocket.c

@@ -414,7 +414,7 @@ static int l_websocket_send(lua_State *L)
 	}
 	websocket_ctrl->frame_wait ++;
 	ret = luat_websocket_send_frame(websocket_ctrl, &pkg);
-	if (ret < 1) {
+	if (ret < 0) {
 		websocket_ctrl->frame_wait --;// 发送失败
 	}
 	lua_pushboolean(L, ret == 0 ? 1 : 0);