Fix AutoSocket to use wrap() instead of post()

This commit is contained in:
Vinnie Falco
2013-08-31 15:31:40 -07:00
parent d022fa68cf
commit f30fe1b699

View File

@@ -127,7 +127,8 @@ public:
{
// must be plain
mSecure = false;
mSocket->get_io_service ().post (boost::bind (cbFunc, error_code ()));
//mSocket->get_io_service ().post (boost::bind (cbFunc, error_code ()));
mSocket->get_io_service ().wrap (cbFunc) (error_code());
}
else
{
@@ -154,7 +155,8 @@ public:
{
ec = e.code();
}
mSocket->get_io_service ().post (boost::bind (handler, ec));
//mSocket->get_io_service ().post (boost::bind (handler, ec));
mSocket->get_io_service ().wrap (handler) (ec);
}
}