Skip to content

Commit 2d17d81

Browse files
author
mpv1989
committed
Fix connection stickiness
1 parent 5605e58 commit 2d17d81

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

ChangeLog.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
99
### Fixed
1010

1111
- fixed `ArangoCursor#next` when performing a dirty read
12+
- fixed connection stickiness
1213

1314
## [5.0.0] - 2018-09-18
1415

src/main/java/com/arangodb/internal/http/HttpCommunication.java

+3
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ public Response execute(final Request request, final HostHandle hostHandle) thro
9191
return response;
9292
} catch (final SocketException se) {
9393
hostHandler.fail();
94+
if (hostHandle != null && hostHandle.getHost() != null) {
95+
hostHandle.setHost(null);
96+
}
9497
final Host failedHost = host;
9598
host = hostHandler.get(hostHandle, accessType);
9699
if (host != null) {

src/main/java/com/arangodb/internal/velocystream/VstCommunication.java

+3
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ protected synchronized C connect(final HostHandle hostHandle, final AccessType a
101101
return connection;
102102
} catch (final IOException e) {
103103
hostHandler.fail();
104+
if (hostHandle != null && hostHandle.getHost() != null) {
105+
hostHandle.setHost(null);
106+
}
104107
final Host failedHost = host;
105108
host = hostHandler.get(hostHandle, accessType);
106109
if (host != null) {

0 commit comments

Comments
 (0)