diff --git a/server.go b/server.go index 74b4f94..2e26ae8 100644 --- a/server.go +++ b/server.go @@ -75,7 +75,7 @@ func (s *server) onConnection(ctx *fasthttp.RequestCtx) { s._clients[cid] = c s._cMtx.Unlock() - s._option.OnConnection(path, c) + s._option.OnConnection(c) }) } diff --git a/server_options.go b/server_options.go index 39b0d70..3153cd7 100644 --- a/server_options.go +++ b/server_options.go @@ -8,7 +8,7 @@ import ( ) type ( - OnConnectionFunc func(path string, c Client) + OnConnectionFunc func(c Client) OnDisconnectedFunc func(c Client) OnPushFunc func() ) @@ -54,7 +54,7 @@ func (o *ServerOptions) Validate() *ServerOptions { } if o.OnConnection == nil { - o.OnConnection = func(path string, c Client) { + o.OnConnection = func(c Client) { } }