Update WebService.kt

pull/56/head
NPC-C83H 5 years ago committed by GitHub
parent b37d95ed70
commit d635edd8a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      app/src/main/java/io/legado/app/service/WebService.kt

@ -48,6 +48,12 @@ class WebService : BaseService() {
override fun onDestroy() {
super.onDestroy()
isRun = false
if (httpServer?.isAlive == true) {
httpServer?.stop()
}
if (webSocketServer?.isAlive == true) {
webSocketServer?.stop()
}
}
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
@ -112,4 +118,4 @@ class WebService : BaseService() {
val notification = builder.build()
startForeground(AppConst.notificationIdWeb, notification)
}
}
}

Loading…
Cancel
Save