PDA

Просмотр полной версии : Fix crash at shutdown


newsbot
04.01.2017, 10:08
Автор: Jose123456


<pre style='white-space:pre-wrap;width:81ex'>Fix crash at shutdown

The boost::io_service created in NetworkThread is not being allowed to clean itself up in the destructor. Here***39;s a quote from the boost docs:

Alternatively, if the application requires that all operations and handlers be allowed to finish normally, the work object may be explicitly destroyed.

boost::asio::io_service io_service;
auto_ptr<boost::asio::io_service::work> work(
new boost::asio::io_service::work(io_service));
...
work.reset(); // Allow run() to exit.

http://www.boost.org/doc/libs/1_62_0/doc/html/boost_asio/reference/io_service.html

close https://github.com/cmangos/mangos-classic/pull/208</pre>


Подробнее... (https://github.com/cmangos/mangos-cata/commit/207e2157893c810f045ac8cf13a6d4fa31d27e57)