Skip to content

Commit

Permalink
Remove needs of package slices
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Egorov committed Jan 10, 2024
1 parent b4f365b commit 4df9a62
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"log"
"net"
"os"
"slices"
"sort"
"strings"
"sync"
Expand Down Expand Up @@ -388,7 +387,7 @@ func (sck *socket) connReaper() {
// Clone the known closed connections to avoid data race
// and remove those under reaper unlocked.
// That would be resoling deadlock from #149 simpler way.
cc := slices.Clone(sck.closedConns)
cc := append([]*Conn{}, sck.closedConns...) // clone
sck.closedConns = nil
sck.reaperCond.L.Unlock()
for _, c := range cc {
Expand Down

0 comments on commit 4df9a62

Please sign in to comment.