summaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-05-02 18:21:36 +0300
committerWolfy-J <[email protected]>2019-05-02 18:21:36 +0300
commiteb8c64941cbcd30ff79b6147efd5fef42eccb648 (patch)
treebde0ceb7e7236850cfe999da7c3ffecf62b58d00 /server.go
parent34abca68708ed881c3360ee749d794b0000a3aec (diff)
miiiinor performance optimizations
Diffstat (limited to 'server.go')
-rw-r--r--server.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/server.go b/server.go
index 26f58172..2672a792 100644
--- a/server.go
+++ b/server.go
@@ -203,9 +203,8 @@ func (s *Server) poolListener(event int, ctx interface{}) {
// throw invokes event handler if any.
func (s *Server) throw(event int, ctx interface{}) {
s.mul.Lock()
- defer s.mul.Unlock()
-
if s.lsn != nil {
s.lsn(event, ctx)
}
+ s.mul.Unlock()
}