mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2024-12-30 02:37:01 +00:00
Update server.go
This commit is contained in:
@@ -49,8 +49,7 @@ func (s *Server) handler(resp http.ResponseWriter, req *http.Request) {
|
||||
|
||||
// Slice of completed sessions
|
||||
s.Lock()
|
||||
completedSessions := make([]Session, len(s.completedSessions))
|
||||
copy(completedSessions, s.completedSessions)
|
||||
completedSessions := append([]Session(nil), s.completedSessions...)
|
||||
s.Unlock()
|
||||
|
||||
tablePrint := func(w io.Writer, sessions []Session) {
|
||||
|
||||
Reference in New Issue
Block a user