mirror of
https://github.com/bigchaindb/js-bigchaindb-driver.git
synced 2024-11-22 01:36:56 +01:00
remove unused headers
This commit is contained in:
parent
bd8db702c4
commit
b30578d9ab
@ -41,7 +41,7 @@ export default class Connection {
|
||||
this.normalizedNodes.push(Connection.normalizeNode(nodes, this.headers))
|
||||
}
|
||||
|
||||
this.transport = new Transport(this.normalizedNodes, this.headers, timeout)
|
||||
this.transport = new Transport(this.normalizedNodes, timeout) // TODO
|
||||
}
|
||||
|
||||
static normalizeNode(node, headers) {
|
||||
|
@ -21,9 +21,8 @@ const BACKOFF_DELAY = 0.5 // seconds
|
||||
|
||||
|
||||
export default class Request {
|
||||
constructor(node, requestConfig) {
|
||||
constructor(node) {
|
||||
this.node = node
|
||||
this.requestConfig = requestConfig
|
||||
this.backoffTime = null
|
||||
this.retries = 0
|
||||
this.connectionError = null
|
||||
|
@ -15,13 +15,13 @@ import Request from './request'
|
||||
|
||||
|
||||
export default class Transport {
|
||||
constructor(nodes, headers, timeout) {
|
||||
constructor(nodes, timeout) {
|
||||
this.connectionPool = []
|
||||
this.timeout = timeout
|
||||
// the maximum backoff time is 10 seconds
|
||||
this.maxBackoffTime = timeout ? timeout / 10 : 10000
|
||||
nodes.forEach(node => {
|
||||
this.connectionPool.push(new Request(node, headers))
|
||||
this.connectionPool.push(new Request(node))
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user