Apply check to errorStream as well

This commit is contained in:
Mygod
2021-04-18 16:32:26 -04:00
committed by GitHub
parent c2a0a6fc46
commit ed13e3ba7f

View File

@@ -70,7 +70,9 @@ abstract class IpMonitor {
try { try {
process.errorStream.bufferedReader().forEachLine { Timber.e(it) } process.errorStream.bufferedReader().forEachLine { Timber.e(it) }
} catch (_: InterruptedIOException) { } catch (e: IOException) { } catch (_: InterruptedIOException) { } catch (e: IOException) {
if ((e.cause as? ErrnoException)?.errno != OsConstants.EBADF) Timber.w(e) if ((e.cause as? ErrnoException)?.errno != OsConstants.EBADF && e.message != "Stream closed") {
Timber.w(e)
}
} }
} }
try { try {