fix: ignore Stream closed exceptions on flush (#7610)
Solves: CON-3587 This exception occurs if continue-binary is killed or throws some unexpected error, but in the previous version, the exception would bubble up and be logged as an IDE error (visible for users). After this change, we catch this exception and only log it, because there's no point in throwing it. The handler still recognizes this invalid state and gracefully restarts the binary.
This commit is contained in:
parent
cce90a7cea
commit
6789833a77
1 changed files with 8 additions and 4 deletions
|
|
@ -43,10 +43,14 @@ class ContinueProcessHandler(
|
|||
}
|
||||
scope.launch(Dispatchers.IO) {
|
||||
for (message in pendingWrites) {
|
||||
log.debug("Write: $message")
|
||||
writer.write(message)
|
||||
writer.write("\r\n")
|
||||
writer.flush()
|
||||
try {
|
||||
log.debug("Write: $message")
|
||||
writer.write(message)
|
||||
writer.write("\r\n")
|
||||
writer.flush()
|
||||
} catch (e: IOException) {
|
||||
log.warn(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue