(chunk, encoding, cb)
| 699 | // of the other side sending a FIN. The standard 'write after end' |
| 700 | // is overly vague, and makes it seem like the user's code is to blame. |
| 701 | function writeAfterFIN(chunk, encoding, cb) { |
| 702 | if (!this.writableEnded) { |
| 703 | return stream.Duplex.prototype.write.call(this, chunk, encoding, cb); |
| 704 | } |
| 705 | |
| 706 | if (typeof encoding === 'function') { |
| 707 | cb = encoding; |
| 708 | encoding = null; |
| 709 | } |
| 710 | |
| 711 | const er = genericNodeError( |
| 712 | 'This socket has been ended by the other party', |
| 713 | { code: 'EPIPE' }, |
| 714 | ); |
| 715 | if (typeof cb === 'function') { |
| 716 | defaultTriggerAsyncIdScope(this[async_id_symbol], process.nextTick, cb, er); |
| 717 | } |
| 718 | this.destroy(er); |
| 719 | |
| 720 | return false; |
| 721 | } |
| 722 | |
| 723 | Socket.prototype.setTimeout = setStreamTimeout; |
| 724 |
nothing calls this directly
no test coverage detected
searching dependent graphs…