mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-07 17:51:16 +08:00
fix session
This commit is contained in:
@@ -47,7 +47,11 @@ func (s *Server) handler(resp http.ResponseWriter, req *http.Request) {
|
||||
return true
|
||||
})
|
||||
|
||||
completedSessions := append([]Session(nil), s.completedSessions...)
|
||||
// Slice of completed sessions
|
||||
s.Lock()
|
||||
completedSessions := make([]Session, len(s.completedSessions))
|
||||
copy(completedSessions, s.completedSessions)
|
||||
s.Unlock()
|
||||
|
||||
tablePrint := func(w io.Writer, sessions []Session) {
|
||||
// Sort by session start time.
|
||||
|
Reference in New Issue
Block a user