Szymon Marczak Szymon Marczak - 4 months ago 28
C++ Question

Error after closing connection in WebSocket++

I've got this:

[info] asio async_read_at_least error: system:10058 (A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous shutdown call)
[error] handle_read_frame error: websocketpp.transport:2 (Underlying Transport Error)


after closing connection by server (not by browser client) in WebSocket++ lib. The server still works, but how can I fix this error?

SERVER CODE: http://pastebin.com/acbrjLvF

Answer

Fixed it by adding m_server.pause_reading(handler) before calling m_server.close on handler.