Commit 2bf44c7e authored by Max Lv's avatar Max Lv

fix some issues

parent 19267732
......@@ -106,8 +106,8 @@ trait BaseService {
override def run() {
if (state != s) {
val n = callbacks.beginBroadcast()
for (i <- 0 to n -1) {
callbacks.getBroadcastItem(i).stateChanged(s, msg)
for (i <- 0 to n - 1) {
callbacks.getBroadcastItem(i).stateChanged(s, msg.substring(0, 64))
}
callbacks.finishBroadcast()
state = s
......
......@@ -606,7 +606,11 @@ class Shadowsocks
def deattachService() {
if (bgService != null) {
bgService.unregisterCallback(callback)
try {
bgService.unregisterCallback(callback)
} catch {
case ignored: RemoteException => // Nothing
}
unbindService(connection)
bgService = null
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment