Skip to content
This repository was archived by the owner on Jul 1, 2022. It is now read-only.

Commit 5e81d89

Browse files
authored
Remove caching of the Sender in Configuration (#685)
This allows the new instance to be up-to-date with of configuration changes. Resolves #684 * Adding a closed attribute on sender * Sender configuration is resolving again is sender is closed. Signed-off-by: Emmanuel Hugonnet <[email protected]>
1 parent 8338be9 commit 5e81d89

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

jaeger-core/src/main/java/io/jaegertracing/Configuration.java

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -615,11 +615,6 @@ public SenderConfiguration getSenderConfiguration() {
615615
*/
616616
@Getter
617617
public static class SenderConfiguration {
618-
/**
619-
* A custom sender set by our consumers. If set, nothing else has effect. Optional.
620-
*/
621-
private Sender sender;
622-
623618
/**
624619
* The Agent Host. Has no effect if the sender is set. Optional.
625620
*/
@@ -684,15 +679,11 @@ public SenderConfiguration withAuthPassword(String password) {
684679
}
685680

686681
/**
687-
* Returns a sender if one was given when creating the configuration, or attempts to create a sender based on the
688-
* configuration's state.
682+
* Returns a sender based on the configuration's state.
689683
* @return the sender passed via the constructor or a properly configured sender
690684
*/
691685
public Sender getSender() {
692-
if (sender == null) {
693-
sender = SenderResolver.resolve(this);
694-
}
695-
return sender;
686+
return SenderResolver.resolve(this);
696687
}
697688

698689
/**

0 commit comments

Comments
 (0)