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:
Peter Johnson
2016-10-25 21:44:47 -07:00
committed by GitHub
parent aa49ebd47f
commit 273a395a2f

View File

@@ -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; });