mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-29 13:27:46 +00:00
Set 10 second timeout on JGit transport commands (#1230)
* GitOperation: set a 10 second connection timeout Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Update changelog Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
993b203676
commit
77e77be999
@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
- Icons in Autofill suggestions are no longer black on almost black in dark mode.
|
- Icons in Autofill suggestions are no longer black on almost black in dark mode.
|
||||||
- Decrypt screen would stay in memory infinitely, allowing passwords to be seen without re-auth
|
- Decrypt screen would stay in memory infinitely, allowing passwords to be seen without re-auth
|
||||||
- Git commits in the store would wrongly use the 'default' committer as opposed to the user's configured one
|
- Git commits in the store would wrongly use the 'default' committer as opposed to the user's configured one
|
||||||
|
- Connection attempts now use a reasonable 10 second timeout as opposed to the default of 30 seconds
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
@ -108,6 +108,7 @@ abstract class GitOperation(protected val callingActivity: FragmentActivity) {
|
|||||||
(transport as? SshTransport)?.sshSessionFactory = sshSessionFactory
|
(transport as? SshTransport)?.sshSessionFactory = sshSessionFactory
|
||||||
credentialsProvider?.let { transport.credentialsProvider = it }
|
credentialsProvider?.let { transport.credentialsProvider = it }
|
||||||
}
|
}
|
||||||
|
command.setTimeout(CONNECT_TIMEOUT)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,4 +205,12 @@ abstract class GitOperation(protected val callingActivity: FragmentActivity) {
|
|||||||
sshSessionFactory?.close()
|
sshSessionFactory?.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Timeout in seconds before [TransportCommand] will abort a stalled IO operation.
|
||||||
|
*/
|
||||||
|
private const val CONNECT_TIMEOUT = 10
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user