From d6bd328ff84f24d81e1406457777767bbc32bf8b Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 24 Feb 2021 22:00:29 +0100 Subject: Add error echo in client handler --- plop.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plop.c b/plop.c index 41b9138..445e3f8 100644 --- a/plop.c +++ b/plop.c @@ -183,6 +183,15 @@ int plop_handle_client(lua_State * L, struct epoll_event * event) } default: { + const char * err = lua_tostring(c->L, -1); + + if (NULL == err) + { + err = "Unknown error ocurred"; + } + + dprintf(2, "%s\n", err); + lua_pop(c->L, 1); connection_free(L, c); return -1; } -- cgit v1.1