Fix excessive logging

This commit is contained in:
Mygod
2018-06-11 07:40:40 +08:00
parent 77cac1c5d4
commit e07280d436

View File

@@ -34,10 +34,10 @@ abstract class IpMonitor : Runnable {
monitor.errorStream.bufferedReader().forEachLine { monitor.errorStream.bufferedReader().forEachLine {
Crashlytics.log(Log.ERROR, javaClass.simpleName, it) Crashlytics.log(Log.ERROR, javaClass.simpleName, it)
} }
} catch (e: IOException) { } catch (_: InterruptedIOException) { } catch (e: IOException) {
e.printStackTrace() e.printStackTrace()
Crashlytics.logException(e) Crashlytics.logException(e)
} catch (_: InterruptedIOException) { } }
} }
try { try {
monitor.inputStream.bufferedReader().forEachLine(this::processLine) monitor.inputStream.bufferedReader().forEachLine(this::processLine)
@@ -48,10 +48,10 @@ abstract class IpMonitor : Runnable {
val pool = Executors.newScheduledThreadPool(1) val pool = Executors.newScheduledThreadPool(1)
pool.scheduleAtFixedRate(this, 1, 1, TimeUnit.SECONDS) pool.scheduleAtFixedRate(this, 1, 1, TimeUnit.SECONDS)
this.pool = pool this.pool = pool
} catch (e: IOException) { } catch (_: InterruptedIOException) { } catch (e: IOException) {
e.printStackTrace() e.printStackTrace()
Crashlytics.logException(e) Crashlytics.logException(e)
} catch (_: InterruptedIOException) { } }
} }
} }