Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
OutgoingMessage.prototype.end = function(a, b) {
BufferList.prototype.end.call(this, a, b)
var packet = this._packet
, that = this
packet.code = toCode(this.code || this.statusCode)
packet.payload = this
if (this._ackTimer)
clearTimeout(this._ackTimer)
this._send(this, packet)
// easy clean up after generating the packet
delete this._packet.payload
return this