(handle, errCode)
| 225 | |
| 226 | // handle === this._handle except when called from doClose(). |
| 227 | finishWrite(handle, errCode) { |
| 228 | // The write request might already have been cancelled. |
| 229 | if (this[kCurrentWriteRequest] === null) |
| 230 | return; |
| 231 | const req = this[kCurrentWriteRequest]; |
| 232 | this[kCurrentWriteRequest] = null; |
| 233 | |
| 234 | handle.finishWrite(req, errCode); |
| 235 | if (this[kPendingShutdownRequest]) { |
| 236 | const req = this[kPendingShutdownRequest]; |
| 237 | this[kPendingShutdownRequest] = null; |
| 238 | this.doShutdown(req); |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | doClose(cb) { |
| 243 | this[kPendingClose] = true; |
no test coverage detected