-
Notifications
You must be signed in to change notification settings - Fork 7
fix: added empty object to shutdown method #50
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: added empty object to shutdown method #50
Conversation
Signed-off-by: Jan <[email protected]>
Signed-off-by: Jan <[email protected]>
berendsliedrecht
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has this been tested with:
- Create connection
- Send message (arrives)
- Disconnect
- Send message (error)
for both sides?
| for (device in connectedDevices) { | ||
| this.gattServer.cancelConnection(device) | ||
| } | ||
| this.gattServer.close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we close the gattServer when we stop advertising?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved the close to the stopAdvertising function.
|
|
||
| @ReactMethod | ||
| fun shutdownCentral( | ||
| @Suppress("UNUSED_PARAMETER") options: ReadableMap, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Central needs no changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean the same changes as in the peripheralManager? The central shutdown works fine without those changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not the same changes per se. As long as it is tested with the flow I mentioned above it is fine.
Signed-off-by: Jan <[email protected]>
|
Why do we need the empty object? |
I am not sure on the internals, tried finding information about it before, but a function without any params needs an empty object to work. It might be fixable by tweaking the Objective-C interface, but this seems to be a fine solution to me. |
|
Can we add a comment? I would remove this I it wouldn't have a comment 😉 |
Signed-off-by: Jan <[email protected]>
No description provided.