1
0
mirror of https://github.com/bigchaindb/js-bigchaindb-driver.git synced 2024-11-22 09:46:58 +01:00

remove unused headers

This commit is contained in:
manolodewiner 2018-08-28 14:27:53 +02:00
parent bd8db702c4
commit b30578d9ab
3 changed files with 4 additions and 5 deletions

View File

@ -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) {

View File

@ -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

View File

@ -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))
})
}