TeleMidia / nclua

Event handling and 2D graphics for Lua scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nclua/event/tcp_socket.c: Cancel pending operations on disconnect_finished()

gflima opened this issue · comments

The disconnect_finished() function should cancel pending send or receive operations. Otherwise, the "disconnect" event will cause these operations to fail with "Socket closed" error. Currently, to avoid reporting such errors, we check if the socket is connected before dispatching errors.