()
| 620 | } |
| 621 | |
| 622 | function socketOnEnd() { |
| 623 | const socket = this; |
| 624 | const req = this._httpMessage; |
| 625 | const parser = this.parser; |
| 626 | |
| 627 | if (!req.res && !req.socket._hadError) { |
| 628 | // If we don't have a response then we know that the socket |
| 629 | // ended prematurely and we need to emit an error on the request. |
| 630 | req.socket._hadError = true; |
| 631 | emitErrorEvent(req, new ConnResetException('socket hang up')); |
| 632 | } |
| 633 | if (parser) { |
| 634 | parser.finish(); |
| 635 | freeParser(parser, req, socket); |
| 636 | } |
| 637 | socket.destroy(); |
| 638 | } |
| 639 | |
| 640 | function socketOnData(d) { |
| 641 | const socket = this; |
nothing calls this directly
no test coverage detected
searching dependent graphs…