Skip to content

Commit ab0b4f1

Browse files
committed
Delaying retry on send when HostUnknownException is thrown
1 parent 8c02428 commit ab0b4f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/main/java/com/microsoft/applicationinsights/internal/channel/common/TransmissionNetworkOutput.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ public boolean send(Transmission transmission) {
168168
}
169169
} catch (UnknownHostException e) {
170170
InternalLogger.INSTANCE.error("Failed to send, wrong host address or cannot reach address due to network issues, exception: %s", e.getMessage());
171+
// backoff retry if host unknown
172+
transmissionPolicyManager.suspendInSeconds(TransmissionPolicy.BLOCKED_BUT_CAN_BE_PERSISTED, DEFAULT_BACKOFF_TIME_SECONDS);
171173
} catch (IOException ioe) {
172174
InternalLogger.INSTANCE.error("Failed to send, exception: %s", ioe.getMessage());
173175
// backoff retry if no connection is found

0 commit comments

Comments
 (0)