This commit is contained in:
MihailRis
2025-09-28 22:22:59 +03:00
parent 2d1c69ee7e
commit 6eda819011
3 changed files with 4 additions and 4 deletions
+1 -2
View File
@@ -33,8 +33,7 @@ static int l_tostring(lua::State* L) {
lua::pop(L); lua::pop(L);
return lua::pushlstring(L, buffer.data(), size); return lua::pushlstring(L, buffer.data(), size);
} else { } else {
lua::bytearray_as_string(L, 1); return lua::pushlstring(L, lua::bytearray_as_string(L, 1));
return 1;
} }
} }
+1 -1
View File
@@ -773,7 +773,7 @@ namespace lua {
lua::pushvalue(L, -2); lua::pushvalue(L, -2);
lua::call(L, 1, 1); lua::call(L, 1, 1);
auto view = lua::tolstring(L, -1); auto view = lua::tolstring(L, -1);
lua::pop(L); lua::pop(L, 2);
return view; return view;
} }
} }
+2 -1
View File
@@ -696,7 +696,8 @@ public:
while (open) { while (open) {
int size = recv(descriptor, buffer.data(), buffer.size(), 0); int size = recv(descriptor, buffer.data(), buffer.size(), 0);
if (size <= 0) { if (size <= 0) {
logger.error() <<id <<"udp connection " << id << handle_socket_error(" recv error").what(); logger.error() << "udp connection " << id
<< handle_socket_error(" recv error").what();
if (!open) break; if (!open) break;
closesocket(descriptor); closesocket(descriptor);
state = ConnectionState::CLOSED; state = ConnectionState::CLOSED;