mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
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:
parent
cf9574b412
commit
93b7ebffaa
@ -124,6 +124,11 @@ client_connect(std::string hostname, int port) {
|
|||||||
MutexDebug::increment_pstats();
|
MutexDebug::increment_pstats();
|
||||||
#endif // DEBUG_THREADS
|
#endif // DEBUG_THREADS
|
||||||
|
|
||||||
|
// Wait for the server hello.
|
||||||
|
while (!_got_udp_port) {
|
||||||
|
transmit_control_data();
|
||||||
|
}
|
||||||
|
|
||||||
return _is_connected;
|
return _is_connected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user