1 Commits
v1.6 ... v1.7

Author SHA1 Message Date
sakuradairong
32182b592e release: v1.7
chore: 桥接器超时 60s,应用层超时 60s(按用户反馈)
2026-06-05 23:55:25 +08:00
3 changed files with 6 additions and 6 deletions

View File

@@ -26,8 +26,8 @@ android {
applicationId "com.example.androidbackupgui"
minSdk 24
targetSdk 34
versionCode 7
versionName "1.6"
versionCode 8
versionName "1.7"
}
buildFeatures {
viewBinding true

View File

@@ -68,7 +68,7 @@ class RestBridgeRunner {
val bridge = ResticRestBridge(transport, remoteBase, cacheDir)
try {
bridge.start(0)
bridge.start(60_000)
val port = bridge.listeningPort
if (port < 0) {
throw IllegalStateException("REST bridge failed to bind a port")

View File

@@ -190,7 +190,7 @@ class ConfigViewModel(application: Application) : AndroidViewModel(application)
viewModelScope.launch {
try {
_operationEvents.emit(OperationEvent.InitStarted)
val result = withTimeoutOrNull(15 * 60 * 1000L) {
val result = withTimeoutOrNull(60_000L) {
ResticWrapper.init(form.repo, form.password,
backend = form.backend, backendUrl = form.backendUrl,
backendUser = form.backendUser, backendPass = form.backendPass,
@@ -199,9 +199,9 @@ class ConfigViewModel(application: Application) : AndroidViewModel(application)
}
if (result == null) {
_operationEvents.emit(OperationEvent.InitFailed)
Log.w(TAG, "initResticRepo timed out after 15 minutes")
Log.w(TAG, "initResticRepo timed out after 1 minute")
_uiState.update { it.copy(resticStatus = it.resticStatus.copy(
message = "初始化超时15分钟),请检查网络/SMB 服务器是否正常"
message = "初始化超时1分钟请检查网络/SMB 服务器是否正常"
))}
refreshResticStatus(form)
} else if (result.isSuccess) {