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

fixed ConcurrentModificationException on BeaconManager #117

Closed
wants to merge 2 commits into from

Conversation

furkanvarol
Copy link
Member

I investigated the problem I told before (#116). It seems like 94520a8 caused problem. I have fixed the problem (actually reverted code). Since, ConsumerInfo is not an immutable class, putting the reference of it after changing isConnected to true is unnecessary.

So, it could be in this way:

for (BeaconConsumer consumer : consumers.keySet()) {
    Boolean alreadyConnected = consumers.get(consumer).isConnected;
    if (!alreadyConnected) {
        consumer.onBeaconServiceConnect();
        ConsumerInfo consumerInfo = consumers.get(consumer);
        consumerInfo.isConnected = true;
    }
}

@furkanvarol
Copy link
Member Author

I think I should re-open pr since my work email got mixed as user.email. Sorry for that

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

Successfully merging this pull request may close these issues.

1 participant