Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Set 10 second timeout on JGit transport commands #1230

Merged
merged 2 commits into from
Dec 3, 2020
Merged

Set 10 second timeout on JGit transport commands #1230

merged 2 commits into from
Dec 3, 2020

Conversation

msfjarvis
Copy link
Member

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates

📜 Description

Sets a reasonable 10 second timeout on JGit transport commands to ensure they don't appear "stuck" for a long time.

💡 Motivation and Context

I've received complaints often and also personally observed that many types of connection issues cause JGit to just stall until the default timeout is reached which takes far too long.

💚 How did you test it?

Verified that enabling a VPN and then trying to pull a repository from my local computer over LAN caused the connection to timeout faster.

📝 Checklist

  • I formatted the code with the IDE's reformat action (Ctrl + Shift + L/Cmd + Shift + L)
  • I reviewed submitted code
  • I added a CHANGELOG entry if applicable

🔮 Next steps

Add support for an additional fallback remote which can be used as a failover when the primary one is unavailable. For my case, the primary one will be my local computer over LAN, and the fallback would be a separately hosted Git repository available over the internet.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
@msfjarvis msfjarvis added this to the v2.0.0 milestone Dec 3, 2020
@msfjarvis msfjarvis added A-Git Area: Git A-auth Area: Connection and authentication C-bug Category: This is a bug P-medium Priority: medium S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Dec 3, 2020
@fmeum fmeum merged commit 77e77be into android-password-store:develop Dec 3, 2020
@msfjarvis msfjarvis deleted the jgit-connect-timeout branch December 3, 2020 12:05
@msfjarvis msfjarvis removed the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Dec 3, 2020
msfjarvis added a commit that referenced this pull request Dec 21, 2020
* 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>
(cherry picked from commit 77e77be)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
@msfjarvis msfjarvis modified the milestones: v2.0.0, v1.13.2 Dec 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-auth Area: Connection and authentication A-Git Area: Git C-bug Category: This is a bug P-medium Priority: medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants