浏览代码

fix: rtmp,断开连接的操作,塞到lwip线程里去

Wendal Chen 3 月之前
父节点
当前提交
1fd0dde21a
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      components/rtmp/binding/luat_lib_rtmp.c

+ 3 - 3
components/rtmp/binding/luat_lib_rtmp.c

@@ -193,7 +193,7 @@ static int l_rtmp_connect(lua_State *L) {
     rtmp_set_state_callback(ud->rtmp, l_state_callback);
     
     int ret = tcpip_callback_with_block(rtmp_connect, (void *)ud->rtmp, 0);
-    LLOGD("RTMP连接请求: %s", ret == 0 ? "成功" : "失败");
+    LLOGD("RTMP发起连接请求: %s", ret == 0 ? "成功" : "失败");
     lua_pushboolean(L, ret == 0 ? 1 : 0);
     return 1;
 }
@@ -212,8 +212,8 @@ static int l_rtmp_disconnect(lua_State *L) {
         return 1;
     }
     
-    int ret = rtmp_disconnect(ud->rtmp);
-    LLOGD("RTMP断开连接: %s", ret == 0 ? "成功" : "失败");
+    int ret = tcpip_callback_with_block(rtmp_disconnect, (void *)ud->rtmp, 0);
+    LLOGD("RTMP发起断开连接请求: %s", ret == 0 ? "成功" : "失败");
     lua_pushboolean(L, ret == 0 ? 1 : 0);
     return 1;
 }