diff options
author | Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> | 2015-11-22 17:14:09 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-11-01 18:27:38 +0100 |
commit | 96b1a6878cbcb05f962abe5c9bb073f4dff6f4dc (patch) | |
tree | 4f321557cd11455a5b888e440fe9355cc1a1fbad /ucb/source | |
parent | 97a22b7a584ae6f5237e18be3265e1a72705d773 (diff) |
ucb: webdav-curl: Fix tdf#90700 Notify connect timeout early.
Throws exception to manage timeout early in the first connection
sequence.
[ port of commit 95958755cbbf8c6026b878703400d5d9ec1e6c98 ]
Change-Id: Ib6d306100ab04a3a21c37108d5c88185acf2524a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123274
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'ucb/source')
-rw-r--r-- | ucb/source/ucp/webdav-curl/webdavcontent.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx b/ucb/source/ucp/webdav-curl/webdavcontent.cxx index 01d8a40df7ee..e579a30c517c 100644 --- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx +++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx @@ -3505,6 +3505,14 @@ Content::ResourceType Content::getResourceType( *networkAccessAllowed = *networkAccessAllowed && shouldAccessNetworkAfterException(e); } + // if the two net events below happen, something + // is going on to the connection so break the command flow + if ( ( e.getError() == DAVException::DAV_HTTP_TIMEOUT ) || + ( e.getError() == DAVException::DAV_HTTP_CONNECT ) ) + { + cancelCommandExecution( e, xEnv ); + // unreachable + } // cancel command execution is case that no user authentication data has been provided. if ( e.getError() == DAVException::DAV_HTTP_NOAUTH ) |