check if peer is connected before trying to connect

This commit is contained in:
orignal 2024-01-18 19:18:51 -05:00
parent 39e378a03d
commit 1e5604ed43
2 changed files with 10 additions and 7 deletions

View file

@ -101,6 +101,8 @@ namespace transport
isReachable = (bool)router->GetCompatibleTransports (true);
}
}
bool IsConnected () const { return !sessions.empty (); }
};
const uint64_t SESSION_CREATION_TIMEOUT = 15; // in seconds