1
0
Fork 0
forked from External/ergo

use maps.Clone from go1.21

This commit is contained in:
Shivaram Lingamneni 2023-08-15 20:57:52 -04:00
parent 28d9a7ff63
commit f77d430d25
5 changed files with 8 additions and 14 deletions

View file

@ -8,6 +8,7 @@ package irc
import (
"crypto/x509"
"fmt"
"maps"
"net"
"runtime/debug"
"strconv"
@ -1743,7 +1744,7 @@ func (client *Client) handleRegisterTimeout() {
func (client *Client) copyLastSeen() (result map[string]time.Time) {
client.stateMutex.RLock()
defer client.stateMutex.RUnlock()
return utils.CopyMap(client.lastSeen)
return maps.Clone(client.lastSeen)
}
// these are bit flags indicating what part of the client status is "dirty"