Skip to content

Commit

Permalink
Avoid closing ServletOutputStream even in case of error
Browse files Browse the repository at this point in the history
The reason why we shouldn't do is that the stream will be closed
by the container. An attempt to close it after an error could crash
because the underlying stream implementation could be already terminated
and underlying resources could be already recycled.
  • Loading branch information
Sergey Mashkov committed Jul 19, 2018
1 parent 3d7b088 commit aa29ebc
Showing 1 changed file with 0 additions and 1 deletion.
Expand Up @@ -49,7 +49,6 @@ private class ServletWriter(val output: ServletOutputStream) : WriteListener {
onError(t)
} finally {
events.close()
output.close()
}
}

Expand Down

0 comments on commit aa29ebc

Please sign in to comment.