diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2018-06-10 12:12:05 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2018-06-10 12:12:16 +0200 |
commit | 0f8f6746ed5c7ce68203618e2528267dab466ffb (patch) | |
tree | 166acd90e5b0b228d8b80e50e64f1e7718245167 /org.eclipse.jgit.lfs | |
parent | d2cb1e7bf5af1e401c8f1f982987190831dbc5b6 (diff) | |
parent | 4ef8769f81949d1b5759645bdba969b6b5a7289a (diff) | |
download | jgit-0f8f6746ed5c7ce68203618e2528267dab466ffb.tar.gz jgit-0f8f6746ed5c7ce68203618e2528267dab466ffb.zip |
Merge branch 'stable-5.0'
* stable-5.0:
Ensure Jsch checks all configured algorithms
RawTextTest#testBinary: use array comparison to compare arrays
LFS: Better SSH authentication token timeout handling
Ensure DirectoryStream is closed promptly
Validate branch names on branch creation
Change-Id: Ic4f6a24b6ccee6730eee3fd5dcb0d1f3e291c478
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.lfs')
-rw-r--r-- | org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java index 25a70c745a..3ac69923f2 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java @@ -273,7 +273,7 @@ public class LfsConnectionFactory { } private static final class AuthCache { - private static final long AUTH_CACHE_EAGER_TIMEOUT = 100; + private static final long AUTH_CACHE_EAGER_TIMEOUT = 500; private static final SimpleDateFormat ISO_FORMAT = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss.SSSX"); //$NON-NLS-1$ @@ -290,8 +290,9 @@ public class LfsConnectionFactory { this.cachedAction = action; try { if (action.expiresIn != null && !action.expiresIn.isEmpty()) { - this.validUntil = System.currentTimeMillis() - + Long.parseLong(action.expiresIn); + this.validUntil = (System.currentTimeMillis() + + Long.parseLong(action.expiresIn)) + - AUTH_CACHE_EAGER_TIMEOUT; } else if (action.expiresAt != null && !action.expiresAt.isEmpty()) { this.validUntil = ISO_FORMAT.parse(action.expiresAt) |