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

fix: Add return statements in setScanPeriod and setBetweenScanPeriod to prevent IllegalStateException (#146) #147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ktanaka101
Copy link

Thank you for creating this useful library!

Closes #146

Fix:

Added return; statements** after result.success(true) and result.error(...) in both setScanPeriod and setBetweenScanPeriod methods.

Reason

The setScanPeriod and setBetweenScanPeriod methods in the FlutterBeaconPlugin were missing return statements after invoking result.success or result.error.
This omission caused the methods to continue execution, inadvertently calling result.notImplemented(),
which led to an IllegalStateException due to multiple responses being sent for a single method call.

…to prevent IllegalStateException

This commit adds missing return statements after result.success and result.error calls in the setScanPeriod and setBetweenScanPeriod methods. This prevents the method from continuing execution and inadvertently calling result.notImplemented(), which was causing IllegalStateException due to multiple responses being sent for a single method call.

Closes alann-maulana#146
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.

Bug: SetScanPeriod and SetBetweenScanPeriod Methods Missing Return Statements Leading to IllegalStateException
1 participant