Skip to content
Snippets Groups Projects
Commit 1c75a69a authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

fixed health callbacks binding later to fix compatibility with go mobile

parent bf5ee1da
No related branches found
No related tags found
1 merge request!23Release
......@@ -259,12 +259,12 @@ func (c *Client) IsNetworkHealthy() bool {
// RegisterNetworkHealthCB registers the network health callback to be called
// any time the network health changes. Returns a unique ID that can be used to
// unregister the network health callback.
func (c *Client) RegisterNetworkHealthCB(nhc NetworkHealthCallback) uint64 {
return c.api.GetHealth().AddFunc(nhc.Callback)
func (c *Client) RegisterNetworkHealthCB(nhc NetworkHealthCallback) int64 {
return int64(c.api.GetHealth().AddFunc(nhc.Callback))
}
func (c *Client) UnregisterNetworkHealthCB(funcID uint64) {
c.api.GetHealth().RemoveFunc(funcID)
func (c *Client) UnregisterNetworkHealthCB(funcID int64) {
c.api.GetHealth().RemoveFunc(uint64(funcID))
}
// RegisterListener records and installs a listener for messages
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment