Don't randomize first server
This commit is contained in:
parent
85824f8980
commit
c861135f80
|
@ -111,8 +111,7 @@ function Client (options) {
|
||||||
|
|
||||||
var self = this
|
var self = this
|
||||||
this.urls = options.url ? [].concat(options.url).map(url.parse) : []
|
this.urls = options.url ? [].concat(options.url).map(url.parse) : []
|
||||||
// select random server at the start
|
this._nextServer = 0
|
||||||
this._nextServer = Math.floor(Math.random() * this.urls.length)
|
|
||||||
// updated in connectSocket() after each connect
|
// updated in connectSocket() after each connect
|
||||||
this.host = undefined
|
this.host = undefined
|
||||||
this.port = undefined
|
this.port = undefined
|
||||||
|
|
Loading…
Reference in New Issue