This commit is contained in:
crusader 2017-08-25 12:04:40 +09:00
parent f3b70701ef
commit 13e42d4489
2 changed files with 3 additions and 3 deletions

View File

@ -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)
})
}

View File

@ -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) {
}
}