mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00
PollerMap.deviceIDs: use zero-inited string slice
This commit is contained in:
parent
14113e215f
commit
6c81134056
@ -204,7 +204,7 @@ func (h *PollerMap) NumPollers() (count int) {
|
||||
func (h *PollerMap) deviceIDs(userID string) []string {
|
||||
h.pollerMu.Lock()
|
||||
defer h.pollerMu.Unlock()
|
||||
devices := make([]string, 0)
|
||||
var devices []string
|
||||
for _, p := range h.Pollers {
|
||||
if !p.terminated.Load() && p.userID == userID {
|
||||
devices = append(devices, p.deviceID)
|
||||
|
Loading…
x
Reference in New Issue
Block a user