various small fixes

This commit is contained in:
Leo Balduf
2016-02-19 14:15:40 +01:00
committed by Jimmy Zelinskie
parent b1f186b665
commit 3b54069a1b
4 changed files with 11 additions and 6 deletions

View File

@@ -41,8 +41,8 @@ func (s *clientStore) CreateClient(clientID string) error {
func (s *clientStore) FindClient(peerID string) (bool, error) {
clientID := clientid.New(peerID)
s.Lock()
defer s.Unlock()
s.RLock()
defer s.RUnlock()
_, ok := s.clientIDs[clientID]