Skip to content

Commit

Permalink
Fix crash in GuardedProcess
Browse files Browse the repository at this point in the history
  • Loading branch information
Mygod committed Aug 29, 2016
1 parent 782af95 commit b8c593b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/scala/com/github/shadowsocks/GuardedProcess.scala
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ class StreamLogger(is: InputStream, tag: String) extends Thread {

override def run() {
withCloseable(new BufferedReader(new InputStreamReader(is))) {
br => Stream.continually(br.readLine()).takeWhile(_ != null).foreach(Log.i(tag, _))
br => try Stream.continually(br.readLine()).takeWhile(_ != null).foreach(Log.i(tag, _)) catch {
case ignore: IOException =>
}
}
}
}
Expand Down

0 comments on commit b8c593b

Please sign in to comment.