Commit 89e00874 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[master] exit from SyncUDPServer::handleRead immediately if stopped.

while not really correct, this seems to work as a workaround for the crash
problem reported in #2946.
okayed on jabber.
parent 0404a592
......@@ -75,6 +75,15 @@ SyncUDPServer::scheduleRead() {
SyncUDPServer::handleRead(const asio::error_code& ec, const size_t length) {
// If the server has been stopped, it could even have been destroyed
// by the time of this call. We'll solve this problem in #2946, but
// until then we exit as soon as possible without accessing any other
// invalidated fields (note that referencing stopped_ is also incorrect,
// but experiments showed it often keeps the original value in practice,
// so we live with it until the complete fix).
if (stopped_) {
if (ec) {
using namespace asio::error;
const asio::error_code::value_type err_val = ec.value();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment