]> source.dussan.org Git - jgit.git/commit
TransportHttp: abort on time-out or on SocketException 87/162987/3
authorThomas Wolf <thomas.wolf@paranor.ch>
Wed, 13 May 2020 18:06:23 +0000 (20:06 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Sat, 23 May 2020 09:06:10 +0000 (11:06 +0200)
commitbdb7357228c6611cea2d266255c7751bd9ed368e
treea347be6bdff88f815f0ce80d56b22d07994c138e
parente2f82d8a7bc8d6779ef676cde175004107b92568
TransportHttp: abort on time-out or on SocketException

Avoid trying other authentication methods on SocketException or on
InterruptedIOException. SocketException is rather fatal, such as
nothing listening on the peer's port, connection reset, or it could
be a connection time-out.

Time-outs enforced by Timeout{Input,Output}Stream may result in
InterruptedIOException being thrown.

In both cases, it makes no sense to try other authentication methods,
and doing so may wrongly report "authentication not supported" or
"cannot open git-upload-pack" or some such instead of reporting a
time-out.

Bug: 563138
Change-Id: I0191b1e784c2471035e550205abd06ec9934fd00
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java