fix(xo-server/callProxyMethod): destroy lines stream in case of error
This commit is contained in:
parent
e360f53a40
commit
98a1ab3033
@ -367,6 +367,7 @@ export default class Proxy {
|
||||
}
|
||||
const isStream = result.$responseType === 'ndjson'
|
||||
if (isStream !== expectStream) {
|
||||
lines.destroy()
|
||||
throw new Error(
|
||||
`expect the result ${expectStream ? '' : 'not'} to be a stream`
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user