Reduce process premature death warnings

This commit is contained in:
Mygod
2021-04-16 15:36:49 -04:00
parent 7cdae63085
commit 78398a9eef
2 changed files with 3 additions and 2 deletions

View File

@@ -303,7 +303,8 @@ class RootServer {
output.close() output.close()
process.outputStream.close() process.outputStream.close()
} catch (e: IOException) { } catch (e: IOException) {
Logger.me.i("send Shutdown failed", e) // Stream closed caused in NullOutputStream
if (e.message != "Stream closed") Logger.me.w("send Shutdown failed", e)
} }
Logger.me.d("Client closed") Logger.me.d("Client closed")
} }

View File

@@ -81,7 +81,7 @@ abstract class IpMonitor {
} else processLine(it) } else processLine(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)
} }
err.join() err.join()
Timber.d("Monitor process exited with ${process.waitFor()}") Timber.d("Monitor process exited with ${process.waitFor()}")