From 55f395243ab0490c94167735aa8c5f02626411b2 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Tue, 21 Dec 2021 00:17:34 +0300 Subject: [PATCH] Init net subsystem --- src/bitcoinrpc.cpp | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 3f52156..2450ca4 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -480,7 +480,10 @@ static CCriticalSection cs_THREAD_RPCHANDLER; void StartRPCServer() { -strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"]; + // Init net subsystem + ix::initNetSystem(); + + strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"]; if (mapArgs["-rpcpassword"].empty()) { unsigned char rand_pwd[32]; @@ -645,6 +648,9 @@ Object CallRPC(const string& strMethod, const Array& params) "If the file does not exist, create it with owner-readable-only file permissions."), GetConfigFile().string().c_str())); + // Init net subsystem + ix::initNetSystem(); + // Create HTTP client ix::HttpClient httpClient; ix::HttpRequestArgsPtr args = httpClient.createRequest(); -- 1.7.1