fix
This commit is contained in:
@@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user