mirror of
https://github.com/GOSTSec/gostcoin
synced 2025-01-30 08:24:20 +00:00
fixed cli crash with boost >= 1.70
This commit is contained in:
parent
ffb77b2f40
commit
51240469f0
@ -591,7 +591,7 @@ public:
|
|||||||
bool connect(const std::string& server, const std::string& port)
|
bool connect(const std::string& server, const std::string& port)
|
||||||
{
|
{
|
||||||
#if (BOOST_VERSION >= 107000) // boost >= 1.70
|
#if (BOOST_VERSION >= 107000) // boost >= 1.70
|
||||||
ip::tcp::resolver resolver(*rpc_io_service);
|
ip::tcp::resolver resolver(stream.get_executor ());
|
||||||
#else
|
#else
|
||||||
ip::tcp::resolver resolver(stream.get_io_service());
|
ip::tcp::resolver resolver(stream.get_io_service());
|
||||||
#endif
|
#endif
|
||||||
@ -629,8 +629,14 @@ template <typename Protocol>
|
|||||||
class AcceptedConnectionImpl : public AcceptedConnection
|
class AcceptedConnectionImpl : public AcceptedConnection
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
#if (BOOST_VERSION >= 107000) // boost >= 1.70
|
||||||
|
template<typename Executor>
|
||||||
AcceptedConnectionImpl(
|
AcceptedConnectionImpl(
|
||||||
asio::io_service& io_service,
|
Executor io_service,
|
||||||
|
#else
|
||||||
|
AcceptedConnectionImpl(
|
||||||
|
asio::io_service& io_service,
|
||||||
|
#endif
|
||||||
ssl::context &context,
|
ssl::context &context,
|
||||||
bool fUseSSL) :
|
bool fUseSSL) :
|
||||||
sslStream(io_service, context),
|
sslStream(io_service, context),
|
||||||
@ -682,7 +688,7 @@ static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketA
|
|||||||
{
|
{
|
||||||
// Accept connection
|
// Accept connection
|
||||||
#if (BOOST_VERSION >= 107000) // boost >= 1.70
|
#if (BOOST_VERSION >= 107000) // boost >= 1.70
|
||||||
AcceptedConnectionImpl<Protocol>* conn = new AcceptedConnectionImpl<Protocol>(*rpc_io_service, context, fUseSSL);
|
AcceptedConnectionImpl<Protocol>* conn = new AcceptedConnectionImpl<Protocol>(acceptor->get_executor (), context, fUseSSL);
|
||||||
#else
|
#else
|
||||||
AcceptedConnectionImpl<Protocol>* conn = new AcceptedConnectionImpl<Protocol>(acceptor->get_io_service(), context, fUseSSL);
|
AcceptedConnectionImpl<Protocol>* conn = new AcceptedConnectionImpl<Protocol>(acceptor->get_io_service(), context, fUseSSL);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user