diff options
Diffstat (limited to 'core/request_handler.go')
-rw-r--r-- | core/request_handler.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/request_handler.go b/core/request_handler.go index 7c185cd..27ff4fc 100644 --- a/core/request_handler.go +++ b/core/request_handler.go @@ -227,6 +227,9 @@ func (c *Connection) LookupByID(ID uint16) (string, error) { return "", errors.New("nil connection passed in") } + c.msgIDsLock.Lock() + defer c.msgIDsLock.Unlock() + for key, id := range c.msgIDs { if id == ID { return key, nil |