added debug log for established realtime connection

This commit is contained in:
Gani Georgiev 2022-07-28 08:26:05 +03:00
parent 686198a22e
commit 9e3b230c8e
1 changed files with 4 additions and 0 deletions

View File

@ -58,6 +58,10 @@ func (api *realtimeApi) connect(c echo.Context) error {
return err return err
} }
if api.app.IsDebug() {
log.Printf("Realtime connection establisehd: %s\n", client.Id())
}
// signalize established connection (aka. fire "connect" message) // signalize established connection (aka. fire "connect" message)
fmt.Fprint(c.Response(), "id:"+client.Id()+"\n") fmt.Fprint(c.Response(), "id:"+client.Id()+"\n")
fmt.Fprint(c.Response(), "event:PB_CONNECT\n") fmt.Fprint(c.Response(), "event:PB_CONNECT\n")