Skip to content

Commit

Permalink
refactor: rename agent to dispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Apr 25, 2021
1 parent 77e7f94 commit e8af211
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/handler/redirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const util = require('../core/util')
const redirectableStatusCodes = [300, 301, 302, 303, 307, 308]

class RedirectHandler {
constructor (agent, { maxRedirections, ...opts }, handler) {
this.agent = agent
constructor (dispatcher, { maxRedirections, ...opts }, handler) {
this.dispatcher = dispatcher
this.location = null
this.abort = null
this.opts = opts
Expand Down Expand Up @@ -98,7 +98,7 @@ class RedirectHandler {
this.location = null
this.abort = null

this.agent.dispatch(this.opts, this)
this.dispatcher.dispatch(this.opts, this)
} else {
this.handler.onComplete(trailers)
}
Expand Down

0 comments on commit e8af211

Please sign in to comment.