diff --git a/luaa.c b/luaa.c index 2e55179ee..fe7f2ea7a 100644 --- a/luaa.c +++ b/luaa.c @@ -907,8 +907,16 @@ luaA_cb(EV_P_ ev_io *w, int revents) s = lua_tolstring(globalconf.L, -1, &len); /* ignore ENOENT because the client may not read */ - if (send(w->fd, s, len, 0) == -1 && errno != ENOENT) - warn("can't send back to client via domain socket: %s", strerror(errno)); + if (send(w->fd, s, len, MSG_DONTWAIT) == -1) + switch(errno) + { + case ENOENT: + case EAGAIN: + break; + default: + warn("can't send back to client via domain socket: %s", strerror(errno)); + break; + } lua_pop(globalconf.L, 1); /* pop the string */ }