Skip to content

Commit

Permalink
Fixed crash when closing WebSocket server
Browse files Browse the repository at this point in the history
  • Loading branch information
MCJack123 committed Jan 2, 2024
1 parent e2ba389 commit 83e9942
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/apis/http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1366,7 +1366,6 @@ static int websocket_server_close(lua_State *L) {
if (f == NULL) return 0;
f->srv->stop();
delete f->srv;
delete f;
*(websocket_server::Factory**)lua_touserdata(L, lua_upvalueindex(1)) = NULL;
return 0;
}
Expand All @@ -1377,7 +1376,6 @@ static int websocket_server_free(lua_State *L) {
if (f == NULL) return 0;
f->srv->stop();
delete f->srv;
delete f;
*(websocket_server::Factory**)lua_touserdata(L, 1) = NULL;
return 0;
}
Expand Down

0 comments on commit 83e9942

Please sign in to comment.