mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Client: when reconnecting, default to NT3. (#143)
Previously once the client fell back once to NT2, it would never try connecting as NT3 even if the server was replaced with a NT3-capable one. Fixes #142.
This commit is contained in:
@@ -346,6 +346,9 @@ void DispatcherBase::ClientThreadMain() {
|
||||
conn->set_proto_rev(m_reconnect_proto_rev);
|
||||
conn->Start();
|
||||
|
||||
// reconnect the next time starting with latest protocol revision
|
||||
m_reconnect_proto_rev = 0x0300;
|
||||
|
||||
// block until told to reconnect
|
||||
m_do_reconnect = false;
|
||||
m_reconnect_cv.wait(lock, [&] { return !m_active || m_do_reconnect; });
|
||||
|
||||
Reference in New Issue
Block a user