(callback)
| 1973 | } |
| 1974 | |
| 1975 | function shutdownWritable(callback) { |
| 1976 | const handle = this[kHandle]; |
| 1977 | if (!handle) return callback(); |
| 1978 | const state = this[kState]; |
| 1979 | if (state.shutdownWritableCalled) { |
| 1980 | debugStreamObj(this, 'shutdownWritable() already called'); |
| 1981 | return callback(); |
| 1982 | } |
| 1983 | state.shutdownWritableCalled = true; |
| 1984 | |
| 1985 | const req = new ShutdownWrap(); |
| 1986 | req.oncomplete = afterShutdown; |
| 1987 | req.callback = callback; |
| 1988 | req.handle = handle; |
| 1989 | const err = handle.shutdown(req); |
| 1990 | if (err === 1) // synchronous finish |
| 1991 | return afterShutdown.call(req, 0); |
| 1992 | } |
| 1993 | |
| 1994 | function finishSendTrailers(stream, headersList) { |
| 1995 | // The stream might be destroyed and in that case |
nothing calls this directly
no test coverage detected