Access violation exeption
When client disconnect the send function throws an exception in 'cancel_timeout()' - 'std::unique_lockstd::mutex lock(timer_mutex);' row. The exception is: "Exception thrown at 0x09643473 (msvcp140d.dll) in mtsrv.dev.exe: 0xC0000005: Access violation reading location 0xDDDDDDDD."
This happens when client disconnected at the same time when server is sending data.
Thank you for reporting this. Do you have the full backtrace?
Also, if you have a simple test case reproducing this access violation it would be great. I failed to reproduce this error on Linux and MacOS.
I get this error on Windows 10 build 16299
SimpleWeb::SocketServerBase<boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::stream_socket_serviceboost::asio::ip::tcp > > >::Connection::cancel_timeout()
SimpleWeb::SocketServerBase<boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::stream_socket_serviceboost::asio::ip::tcp > > >::Connection::send(const std::shared_ptr<SimpleWeb::SocketServerBase<boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::stream_socket_serviceboost::asio::ip::tcp > > >::SendStream> & send_stream, const std::function<void __cdecl(boost::system::error_code const &)> & callback, unsigned char fin_rsv_opcode)
I'm no help here sadly since I do not use Windows, and to me it seems like a boost on Windows issue. Maybe upgrading boost will help? Hopefully, someone with Windows background can look into this.