Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions memcache/memcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ func (c *Client) touchFromAddr(addr net.Addr, keys []string, expiration int32) e
// If no error is returned, the returned map will also be non-nil.
func (c *Client) GetMulti(keys []string) (map[string]*Item, error) {
var mu sync.Mutex
m := make(map[string]*Item)
m := make(map[string]*Item, len(keys))
addItemToMap := func(it *Item) {
mu.Lock()
defer mu.Unlock()
Expand All @@ -491,7 +491,7 @@ func (c *Client) GetMulti(keys []string) (map[string]*Item, error) {
}
addr, err := c.selector.PickServer(key)
if err != nil {
return nil, err
continue
}
keyMap[addr] = append(keyMap[addr], key)
}
Expand Down