( request: Request, debugDestination: Destination, )
| 6069 | } |
| 6070 | |
| 6071 | export function startFlowingDebug( |
| 6072 | request: Request, |
| 6073 | debugDestination: Destination, |
| 6074 | ): void { |
| 6075 | if (request.status === CLOSING) { |
| 6076 | request.status = CLOSED; |
| 6077 | closeWithError(debugDestination, request.fatalError); |
| 6078 | return; |
| 6079 | } |
| 6080 | if (request.status === CLOSED) { |
| 6081 | return; |
| 6082 | } |
| 6083 | if (request.debugDestination !== null) { |
| 6084 | // We're already flowing. |
| 6085 | return; |
| 6086 | } |
| 6087 | request.debugDestination = debugDestination; |
| 6088 | try { |
| 6089 | flushCompletedChunks(request); |
| 6090 | } catch (error) { |
| 6091 | logRecoverableError(request, error, null); |
| 6092 | fatalError(request, error); |
| 6093 | } |
| 6094 | } |
| 6095 | |
| 6096 | export function stopFlowing(request: Request): void { |
| 6097 | request.destination = null; |
no test coverage detected