Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
🐛 Allow falsy prefetch option (#24)
Browse files Browse the repository at this point in the history
* Allow falsy prefetch

* 🔨 Better validation for prefetch counts

Goes hand-in-hand with allowing falsey values.
  • Loading branch information
jacktuck authored and jpwilliams committed May 3, 2017
1 parent 6057dd6 commit eec91c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ function Remit (opts) {
this._url = opts.url || 'amqp://localhost'
this._trace = opts.trace === false ? false : true
this._exchange_name = opts.exchange || 'remit'
this._prefetch = opts.prefetch || 128
this._prefetch = parseInt(opts.prefetch)
if (isNaN(this._prefetch)) this._prefetch = 128

// Global items
this._connection = opts.connection || null
Expand Down

0 comments on commit eec91c8

Please sign in to comment.