Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
gatewayTimeout: function gatewayTimeout (message) {
return new createError.GatewayTimeout(message)
},
const timer = setTimeout(() => {
socket.close()
next(new GatewayTimeout())
}, timeout)
socket.once('close', () => clearTimeout(timer))