Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Allenxuxu committed Dec 12, 2019
1 parent a71b547 commit 9d9d1c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ func (s *Server) handleNewConnection(fd int, sa *unix.Sockaddr) {

c := connection.New(fd, loop, sa, s.opts.Protocol, s.callback.OnMessage, s.callback.OnClose)

_ = loop.AddSocketAndEnableRead(fd, c)

s.callback.OnConnect(c)

_ = loop.AddSocketAndEnableRead(fd, c)
}

// Start 启动 Server
Expand Down

0 comments on commit 9d9d1c0

Please sign in to comment.