mirror of
https://github.com/sot-tech/mochi.git
synced 2026-04-30 09:30:00 -07:00
store: ClientStore now using chihaya.PeerID
This commit is contained in:
committed by
Jimmy Zelinskie
parent
7be6dcaaa3
commit
a64e655376
@@ -7,6 +7,7 @@ package memory
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/chihaya/chihaya"
|
||||
"github.com/chihaya/chihaya/pkg/clientid"
|
||||
"github.com/chihaya/chihaya/server/store"
|
||||
)
|
||||
@@ -39,8 +40,8 @@ func (s *clientStore) CreateClient(clientID string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *clientStore) FindClient(peerID string) (bool, error) {
|
||||
clientID := clientid.New(peerID)
|
||||
func (s *clientStore) FindClient(peerID chihaya.PeerID) (bool, error) {
|
||||
clientID := clientid.New(string(peerID))
|
||||
s.RLock()
|
||||
defer s.RUnlock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user