Skip to content
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

ConcurrentModificationException in connect #36

Open
tunesmith opened this issue Mar 4, 2017 · 0 comments
Open

ConcurrentModificationException in connect #36

tunesmith opened this issue Mar 4, 2017 · 0 comments

Comments

@tunesmith
Copy link

tunesmith commented Mar 4, 2017

It looks like this code from NSQConsumer.java (around line 202) will sometimes throw a ConcurrentModificationException:

        for (final ServerAddress server : Sets.difference(oldAddresses, newAddresses)) {
            LogManager.getLogger(this).info("Remove connection " + server.toString());
            connections.get(server).close();
            connections.remove(server);
        }

Since the exception is uncaught, the scheduler.scheduleAtFixedRate then silently fails, which is bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant