Disable trying non-takeover reconnect first

This commit is contained in:
Tulir Asokan 2021-02-24 00:13:26 +02:00
parent 69e5a26e01
commit 3b6d4322d6

View file

@ -871,7 +871,6 @@ func (user *User) tryReconnect(msg string) {
baseDelay = -baseDelay + 1
}
delay := baseDelay
takeover := false
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
user.cancelReconnect = cancel
@ -882,8 +881,7 @@ func (user *User) tryReconnect(msg string) {
return
default:
}
err := user.Conn.Restore(takeover, ctx)
takeover = true
err := user.Conn.Restore(true, ctx)
if err == nil {
user.ConnectionErrors = 0
if user.bridge.Config.Bridge.ReportConnectionRetry {