Skip to content

memory leak #201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 8, 2016
Merged
Changes from all commits
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 @@ -600,6 +600,8 @@ void close() {
private class SocketAdder implements Subscriber<ReactiveSocket> {
private final ReactiveSocketClient factory;

private int errors = 0;

private SocketAdder(ReactiveSocketClient factory) {
this.factory = factory;
}
Expand Down Expand Up @@ -632,7 +634,11 @@ public void onError(Throwable t) {
logger.warn("Exception while subscribing to the ReactiveSocket source", t);
synchronized (LoadBalancer.this) {
pendingSockets -= 1;
activeFactories.add(factory);
if (++errors < 5) {
activeFactories.add(factory);
} else {
logger.warn("Exception count greater than 5, not re-adding factory {}", factory.toString());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: greater than 4?

}
}
}

Expand Down