Don't randomize first server

This commit is contained in:
Martin Cizek 2020-09-18 15:31:58 +02:00
parent 85824f8980
commit c861135f80
1 changed files with 1 additions and 2 deletions

View File

@ -111,8 +111,7 @@ function Client (options) {
var self = this
this.urls = options.url ? [].concat(options.url).map(url.parse) : []
// select random server at the start
this._nextServer = Math.floor(Math.random() * this.urls.length)
this._nextServer = 0
// updated in connectSocket() after each connect
this.host = undefined
this.port = undefined