mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-14 10:20:01 +00:00
lsp_mg_read: remove dead code, return nil on empty read
This commit is contained in:
1 parent
fbca54bcaf
commit
ce55924a02
1 file changed
+1
-1
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user