Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrivoruchko committed Apr 30, 2021
1 parent 6bfc1df commit 0a30e24
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
applicationId = "info.dvkr.screenstream"
minSdkVersion(21)
targetSdkVersion(30)
versionCode = 30601
versionName = "3.6.1"
versionCode = 30602
versionName = "3.6.2"
resConfigs("en", "ru", "pt-rBR", "zh-rTW", "fr-rFR", "fa", "it", "pl", "hi", "de", "sk", "es", "ar", "ja", "gl", "ca")

vectorDrawables.useSupportLibrary = true
Expand Down
4 changes: 2 additions & 2 deletions data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion(21)
targetSdkVersion(30)
versionCode = 30601
versionName = "3.6.1"
versionCode = 30602
versionName = "3.6.2"
}

compileOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import io.ktor.utils.io.*
import kotlinx.coroutines.*
import kotlinx.coroutines.flow.*
import java.io.ByteArrayOutputStream
import java.io.IOException
import java.net.BindException
import java.util.*
import java.util.concurrent.atomic.AtomicReference
Expand Down Expand Up @@ -66,7 +67,8 @@ internal class HttpServer(
XLog.d(getLog("startServer"))

val coroutineExceptionHandler = CoroutineExceptionHandler { _, throwable ->
XLog.e(getLog("onCoroutineException"))
if (throwable is IOException) return@CoroutineExceptionHandler
XLog.e(getLog("onCoroutineException >>>"))
XLog.e(getLog("onCoroutineException"), throwable)
sendEvent(Event.Error(FatalError.HttpServerException))
ktorServer?.stop(250, 250)
Expand Down Expand Up @@ -126,7 +128,7 @@ internal class HttpServer(
XLog.w(getLog("startServer", ex.toString()))
exception = FixableError.AddressInUseException
} catch (throwable: Throwable) {
XLog.e(getLog("startServer"))
XLog.e(getLog("startServer >>>"))
XLog.e(getLog("startServer"), throwable)
exception = FatalError.HttpServerException
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ internal fun Application.appModule(
val clientId = ClientData.getId(ipAddress, fallbackHost)

if (clientData.isClientAllowed(clientId, ipAddress, fallbackHost).not()) {
call.respond(HttpStatusCode.Forbidden)
call.respond(HttpStatusCode.NotFound)
return@get
}

Expand Down

0 comments on commit 0a30e24

Please sign in to comment.