mirror of
https://github.com/bigchaindb/js-bigchaindb-driver.git
synced 2025-02-14 21:10:32 +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.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) {
|
static normalizeNode(node, headers) {
|
||||||
|
@ -21,9 +21,8 @@ const BACKOFF_DELAY = 0.5 // seconds
|
|||||||
|
|
||||||
|
|
||||||
export default class Request {
|
export default class Request {
|
||||||
constructor(node, requestConfig) {
|
constructor(node) {
|
||||||
this.node = node
|
this.node = node
|
||||||
this.requestConfig = requestConfig
|
|
||||||
this.backoffTime = null
|
this.backoffTime = null
|
||||||
this.retries = 0
|
this.retries = 0
|
||||||
this.connectionError = null
|
this.connectionError = null
|
||||||
|
@ -15,13 +15,13 @@ import Request from './request'
|
|||||||
|
|
||||||
|
|
||||||
export default class Transport {
|
export default class Transport {
|
||||||
constructor(nodes, headers, timeout) {
|
constructor(nodes, timeout) {
|
||||||
this.connectionPool = []
|
this.connectionPool = []
|
||||||
this.timeout = timeout
|
this.timeout = timeout
|
||||||
// the maximum backoff time is 10 seconds
|
// the maximum backoff time is 10 seconds
|
||||||
this.maxBackoffTime = timeout ? timeout / 10 : 10000
|
this.maxBackoffTime = timeout ? timeout / 10 : 10000
|
||||||
nodes.forEach(node => {
|
nodes.forEach(node => {
|
||||||
this.connectionPool.push(new Request(node, headers))
|
this.connectionPool.push(new Request(node))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user