aboutsummaryrefslogtreecommitdiff
path: root/hotline/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'hotline/server.go')
-rw-r--r--hotline/server.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/hotline/server.go b/hotline/server.go
index bd15a2e..e28ff9a 100644
--- a/hotline/server.go
+++ b/hotline/server.go
@@ -152,13 +152,12 @@ func (s *Server) sendTransaction(t Transaction) error {
}
s.mux.Lock()
+ defer s.mux.Unlock()
client := s.Clients[uint16(clientID)]
if client == nil {
return fmt.Errorf("invalid client id %v", *t.clientID)
}
- s.mux.Unlock()
-
b, err := t.MarshalBinary()
if err != nil {
return err