Dont start the ping until we are connected

This commit is contained in:
Owen
2026-01-17 17:32:01 -08:00
parent 9d77a1daf7
commit 43c8a14fda
3 changed files with 29 additions and 2 deletions

View File

@@ -198,6 +198,9 @@ func (o *Olm) handleConnect(msg websocket.WSMessage) {
o.connected = true
// Start ping monitor now that we are registered and connected
o.websocket.StartPingMonitor()
// Invoke onConnected callback if configured
if o.olmConfig.OnConnected != nil {
go o.olmConfig.OnConnected()