Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,8 @@ private synchronized boolean updateAddress() throws IOException {
LOG.warn("Address change detected. Old: " + server.toString() +
" New: " + currentAddr.toString());
server = currentAddr;
// Update the remote address so that reconnections are with the updated address. This avoids thrashing.
remoteId.setAddress(currentAddr);
UserGroupInformation ticket = remoteId.getTicket();
this.setName("IPC Client (" + socketFactory.hashCode()
+ ") connection to " + server.toString() + " from "
Expand Down Expand Up @@ -1753,7 +1755,16 @@ public ConnectionId(InetSocketAddress address, Class<?> protocol,
InetSocketAddress getAddress() {
return address;
}


/**
* Used to update the remote address when an address change is detected.
*
* @param address the new address
*/
private void setAddress(InetSocketAddress address) {
this.address = address;
}

Class<?> getProtocol() {
return protocol;
}
Expand Down