Skip to content

Commit 85b2f62

Browse files
committed
[wip] diagnose: fix for boost 1.87
1 parent 94747c5 commit 85b2f62

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/wallet/diagnose.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ bool Diagnose::m_hasPoolProjects = false;
1515
bool Diagnose::m_configured_for_investor_mode = false;
1616
std::unordered_map<Diagnose::TestNames, Diagnose*> Diagnose::m_name_to_test_map;
1717
CCriticalSection Diagnose::cs_diagnostictests;
18-
boost::asio::io_service Diagnose::s_ioService;
18+
boost::asio::io_context Diagnose::s_ioService;
1919

2020
/**
2121
* The function check the time is correct on your PC. It checks the skew in the clock.

src/wallet/diagnose.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class Diagnose
185185
static CCriticalSection cs_diagnostictests; //!< used to protect the critical sections, for multithreading
186186
TestNames m_test_name; //!< This must be defined for derived classes. Each derived class must declare the name of the test and add to the TestNames enum
187187
static std::unordered_map<Diagnose::TestNames, Diagnose*> m_name_to_test_map; //!< a map to save the test and a pointer to it. Some tests are related and need to access the results of each other.
188-
static boost::asio::io_service s_ioService;
188+
static boost::asio::io_context s_ioService;
189189
};
190190

191191
/**
@@ -381,7 +381,7 @@ class VerifyClock : public Diagnose
381381

382382
connectToNTPHost();
383383

384-
s_ioService.reset();
384+
s_ioService.restart();
385385
s_ioService.run();
386386
}
387387
}
@@ -638,7 +638,7 @@ class VerifyTCPPort : public Diagnose
638638
private:
639639
boost::asio::ip::tcp::socket m_tcpSocket;
640640
void handle_connect(const boost::system::error_code& err,
641-
boost::asio::ip::tcp::resolver::iterator endpoint_iterator);
641+
boost::asio::ip::tcp::resolver::results_type::iterator endpoint_iterator);
642642

643643
void TCPFinished();
644644

@@ -649,7 +649,7 @@ class VerifyTCPPort : public Diagnose
649649
~VerifyTCPPort() {}
650650
void runCheck()
651651
{
652-
s_ioService.reset();
652+
s_ioService.restart();
653653

654654
m_results_string_arg.clear();
655655
m_results_tip_arg.clear();
@@ -671,7 +671,7 @@ class VerifyTCPPort : public Diagnose
671671
auto endpoint_iterator = resolver.resolve(query);
672672
#endif
673673

674-
if (endpoint_iterator == boost::asio::ip::tcp::resolver::iterator()) {
674+
if (endpoint_iterator == boost::asio::ip::tcp::resolver::results_type::iterator()) {
675675
m_tcpSocket.close();
676676
m_results = WARNING;
677677
m_results_tip = _("Outbound communication to TCP port %1 appears to be blocked.");

0 commit comments

Comments
 (0)