Skip to content

Commit

Permalink
fixes bug
Browse files Browse the repository at this point in the history
  • Loading branch information
actboy168 committed May 7, 2024
1 parent 297c0ae commit b4bcc9e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions binding/lua_channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <bee/lua/binding.h>
#include <bee/lua/module.h>
#include <bee/net/event.h>
#include <bee/net/socket.h>
#include <bee/thread/spinlock.h>

#include <map>
Expand Down Expand Up @@ -162,6 +163,10 @@ namespace bee::lua_channel {
}

static int luaopen(lua_State* L) {
if (!net::socket::initialize()) {
lua_pushstring(L, error::sys_errmsg("initialize").c_str());
return lua_error(L);
}
luaL_Reg lib[] = {
{ "create", lcreate },
{ "query", lquery },
Expand Down

0 comments on commit b4bcc9e

Please sign in to comment.