summaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
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()
}