pstats: PStatClient.connect() should wait for UDP connection to be established

This makes the behavior of PStats more predictable, reducing missed frames at the beginning
This commit is contained in:
rdb 2022-02-15 17:31:34 +01:00
parent cf9574b412
commit 93b7ebffaa

View File

@ -124,6 +124,11 @@ client_connect(std::string hostname, int port) {
MutexDebug::increment_pstats();
#endif // DEBUG_THREADS
// Wait for the server hello.
while (!_got_udp_port) {
transmit_control_data();
}
return _is_connected;
}