diff options
author | Aki <please@ignore.pl> | 2021-02-24 22:00:29 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2021-02-24 22:00:29 +0100 |
commit | d6bd328ff84f24d81e1406457777767bbc32bf8b (patch) | |
tree | a38628b371b49b002dd404a1019f36c3eee4f9c5 | |
parent | 87d97759fbe62be67ad26f55600715c0f426f542 (diff) | |
download | plop-d6bd328ff84f24d81e1406457777767bbc32bf8b.zip plop-d6bd328ff84f24d81e1406457777767bbc32bf8b.tar.gz plop-d6bd328ff84f24d81e1406457777767bbc32bf8b.tar.bz2 |
Add error echo in client handler
-rw-r--r-- | plop.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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; } |