Closed SyRenity closed 9 years ago
you can skip close
as the server closes on error (https://github.com/lipp/lua-websockets/blob/master/src/websocket/sync.lua#L84).
i recommend to call close anyhow to be more verbose on resource management.
@lipp Just to confirm, it will go to the error branch if the message was not received during step timeout?
Or there are other conditions that it can end up on the error code branch?
In the example I see that the socket is closed: https://github.com/lipp/lua-websockets/blob/master/examples/echo-server-copas.lua
I tried both with and without, and it seems there is no need to re-open the socket from the client site.
What is the actual use of this, and is it really needed?