Error in websocket example
When using the web_socket example, i get an error bad file descriptor on the console right after closing the connection.
Here is the log: Sent welcome message to 3a64fe9d-cf53-48c4-a9f3-b1a830d55cd7. Closed connection to 3a64fe9d-cf53-48c4-a9f3-b1a830d55cd7. WebSocket Errored 'Bad file descriptor' for 3a64fe9d-cf53-48c4-a9f3-b1a830d55cd7.
i use the simple websocket client extension in chrome as a debug client.
The example does not crash.
Thanks for reporting this will look into it shortly.
Is there any update to this?
After looking into the source code, I saw that by adding a check for m_is_open in socket_impl.cpp in the read and write functions, this error disappears.
Awesome please provide a PR. Sorry we haven't made time for this yet we are beavering away with the upcoming 5.0 release.
#208 is the pull request
Thanks, I'll action this before end of the week.
Attempted to look into this however formatting has gone loopy as all the whitespace has changed.
https://github.com/Corvusoft/restbed/pull/208/commits/2966cfeb5593ba4efc776a0dc3a1bc8fcd0afaba
Please format the code as per restbed/tool/astyle/options prior to committing. To ease future development we have supplied a pre-commit hook under restbed/tool/git/pre-commit.
I made another commit that highlights the changes i made.
#210 new pull request
Great work @stkrwork.