(request: Request, destination: Destination)
| 6047 | } |
| 6048 | |
| 6049 | export function startFlowing(request: Request, destination: Destination): void { |
| 6050 | if (request.status === CLOSING) { |
| 6051 | request.status = CLOSED; |
| 6052 | closeWithError(destination, request.fatalError); |
| 6053 | return; |
| 6054 | } |
| 6055 | if (request.status === CLOSED) { |
| 6056 | return; |
| 6057 | } |
| 6058 | if (request.destination !== null) { |
| 6059 | // We're already flowing. |
| 6060 | return; |
| 6061 | } |
| 6062 | request.destination = destination; |
| 6063 | try { |
| 6064 | flushCompletedChunks(request); |
| 6065 | } catch (error) { |
| 6066 | logRecoverableError(request, error, null); |
| 6067 | fatalError(request, error); |
| 6068 | } |
| 6069 | } |
| 6070 | |
| 6071 | export function startFlowingDebug( |
| 6072 | request: Request, |
no test coverage detected