mirror of
https://github.com/cesanta/mongoose.git
synced 2025-08-06 13:37:34 +08:00
lsp_mg_read: remove dead code, return nil on empty read
This commit is contained in:
parent
fbca54bcaf
commit
ce55924a02
@ -4070,7 +4070,7 @@ static int lsp_mg_read(lua_State *L) {
|
||||
char buf[1024];
|
||||
int len = mg_read(conn, buf, sizeof(buf));
|
||||
|
||||
lua_settop(L, 0);
|
||||
if (!len) return 0;
|
||||
lua_pushlstring(L, buf, len);
|
||||
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user