From 390d79c9aa61e2cb16305b77543a59527a7d58dd Mon Sep 17 00:00:00 2001 From: Mygod Date: Fri, 11 Mar 2016 22:05:13 +0800 Subject: [PATCH] Add missing volatile --- src/main/scala/com/github/shadowsocks/GuardedProcess.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/com/github/shadowsocks/GuardedProcess.scala b/src/main/scala/com/github/shadowsocks/GuardedProcess.scala index 15c8eb04..024c1b79 100644 --- a/src/main/scala/com/github/shadowsocks/GuardedProcess.scala +++ b/src/main/scala/com/github/shadowsocks/GuardedProcess.scala @@ -60,7 +60,7 @@ class GuardedProcess(cmd: Seq[String]) extends Process { def start(onRestartCallback: () => Unit = null): GuardedProcess = { val semaphore = new Semaphore(1) semaphore.acquire - var ioException: IOException = null + @volatile var ioException: IOException = null guardThread = new Thread(() => { try {