mirror of
https://github.com/logos-messaging/logos-messaging-go-bindings.git
synced 2026-01-02 14:03:10 +00:00
fix: properly using waitgroup in num relay peers api
This commit is contained in:
parent
a4db2843d0
commit
ce9fb74360
@ -595,7 +595,9 @@ func (n *WakuNode) GetNumConnectedRelayPeers(optPubsubTopic ...string) (int, err
|
||||
var cPubsubTopic = C.CString(pubsubTopic)
|
||||
defer C.free(unsafe.Pointer(cPubsubTopic))
|
||||
|
||||
wg.Add(1)
|
||||
C.cGoWakuGetNumConnectedRelayPeers(n.wakuCtx, cPubsubTopic, resp)
|
||||
wg.Wait()
|
||||
|
||||
if C.getRet(resp) == C.RET_OK {
|
||||
numPeersStr := C.GoStringN(C.getMyCharPtr(resp), C.int(C.getMyCharLen(resp)))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user