mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-27 14:55:44 +00:00
fix: fix mailserver getting a random with a possible wrong index
This commit is contained in:
parent
898bb27b56
commit
273d565e9e
@ -152,7 +152,7 @@ proc autoConnect*(self: MailserverModel) =
|
||||
# Picks a random mailserver amongs the ones with the lowest latency
|
||||
# The pool size is 1/4 of the mailservers were pinged successfully
|
||||
randomize()
|
||||
let mailServer = availableMailservers[rand(poolSize(availableMailservers.len))][0]
|
||||
let mailServer = availableMailservers[rand(poolSize(availableMailservers.len - 1))][0]
|
||||
self.connect(mailserver)
|
||||
|
||||
proc changeMailserver*(self: MailserverModel) =
|
||||
|
Loading…
x
Reference in New Issue
Block a user