bot18
Version:
A high-frequency cryptocurrency trading bot by Zenbot creator @carlos8f
17 lines • 431 B
JavaScript
module.exports = function container (get) {
return function pause (req, res, next) {
// buffer incoming data until unpause() is called
req.pause = function () {
if (req.paused) return
req.paused = true
var paused = get('vendor.pause')(req)
req.unpause = function () {
if (!req.paused) return
req.paused = false
paused.resume()
}
}
req.pause()
next()
}
}