mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 10:41:03 +01:00
Some fixes to the previous edit
Former-commit-id: da5219084b60d820ced713feff837e3964fa1fb0
This commit is contained in:
parent
9061d3d695
commit
1cd9b70791
|
@ -316,8 +316,10 @@ func (s *Server) GetTotalConnections() int {
|
|||
// GetConnections returns all connections
|
||||
func (s *Server) GetConnections() []Connection {
|
||||
s.mu.RLock()
|
||||
conns:= make([]Connection, len(s.connections))
|
||||
copy(conns, s.connections)
|
||||
conns := make([]Connection, len(s.connections), len(s.connections))
|
||||
for i, c := range s.connections {
|
||||
conns[i] = c.value
|
||||
}
|
||||
s.mu.RUnlock()
|
||||
return conns
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user