Renxuan Wang 839af5701e
Fix bug in resolveTCPEndpoint() when hostname resolving fails. (#7375)
* Close trace file when error happens in runNetwork().

* Improve the bestCount algorithm in getLeader().

In the current implementation, if the nominees are [0,1], the chosen leader will be 1, which is an exception to other cases and our expectation that if 2 nominees have the same frequency, the one with lower id will be the leader.

* Remove unnecessary new statement.

stream will never be a nullptr.

* Move self->dnsCache out of lambda capture.

Member variables are not capture by default, thus, `host` and `service` are not captured. This somehow successfully compile, but throws std::bad_alloc or basic_string::_S_create exceptions when we call `host+":"+service` in dnsCache.remove().

* Revert unintended change.

* Address comments.
2022-06-13 20:24:30 -07:00
..
2022-03-21 13:36:23 -07:00
2020-05-22 09:25:32 -07:00
2022-06-02 13:22:50 +02:00
2022-06-02 13:22:50 +02:00
2022-06-02 13:22:50 +02:00
2022-06-02 13:22:50 +02:00
2022-05-25 17:16:56 -05:00
2022-03-21 13:36:23 -07:00
2022-04-11 09:17:10 -06:00
2022-04-11 09:17:10 -06:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00
2022-04-04 15:08:17 -07:00
2022-04-04 15:08:17 -07:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00
2022-02-25 14:54:52 +01:00
2022-03-21 13:36:23 -07:00
2022-06-02 13:22:50 +02:00
2022-06-02 13:22:50 +02:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00
2022-03-21 13:36:23 -07:00