lsp_mg_read: remove dead code, return nil on empty read

This commit is contained in:
abadc0de 2013-03-17 23:33:02 -04:00
parent fbca54bcaf
commit ce55924a02

View File

@ -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;