File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
src/agent/Core/SpawningKit/Handshake Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 3434#include < oxt/backtrace.hpp>
3535#include < string>
3636#include < vector>
37- #include < stdexcept >
37+ #include < exception >
3838#include < cstddef>
3939#include < cstdlib>
4040#include < cerrno>
@@ -196,8 +196,18 @@ class HandshakePerform {
196196
197197 while (true ) {
198198 unsigned long long timeout = 100000 ;
199+ bool pingable;
199200
200- if (pingTcpServer (" 127.0.0.1" , session.expectedStartPort , &timeout)) {
201+ try {
202+ pingable = pingTcpServer (" 127.0.0.1" , session.expectedStartPort , &timeout);
203+ } catch (const std::exception &e) {
204+ P_WARN (" Error checking whether 127.0.0.1:" << session.expectedStartPort
205+ << " is connectable: " << e.what ());
206+ syscalls::usleep (50000 );
207+ continue ;
208+ }
209+
210+ if (pingable) {
201211 boost::lock_guard<boost::mutex> l (syncher);
202212 socketIsNowPingable = true ;
203213 finishState = FINISH_SUCCESS;
You can’t perform that action at this time.
0 commit comments