fixed race condition

This commit is contained in:
orignal 2014-10-09 21:40:45 -04:00
parent 3de4010a47
commit a0a0234d29
2 changed files with 3 additions and 2 deletions

View file

@ -59,6 +59,7 @@ namespace stream
default:
;
}
m_Socket.close ();
delete this;
}
@ -447,7 +448,7 @@ namespace stream
{
LogPrint ("SAM stream read error: ", ecode.message ());
if (ecode != boost::asio::error::operation_aborted)
Terminate ();
m_Socket.get_io_service ().post (boost::bind (&SAMSocket::Terminate, this));
}
else
{