mirror of
https://github.com/pterodactyl/wings.git
synced 2026-04-11 02:25:20 -05:00
20 lines
449 B
Go
20 lines
449 B
Go
package server
|
|
|
|
import (
|
|
"github.com/pterodactyl/wings/system"
|
|
)
|
|
|
|
// Sftp returns the SFTP connection bag for the server instance. This bag tracks
|
|
// all open SFTP connections by individual user and allows for a single user or
|
|
// all users to be disconnected by other processes.
|
|
func (s *Server) Sftp() *system.ContextBag {
|
|
s.Lock()
|
|
defer s.Unlock()
|
|
|
|
if s.sftpBag == nil {
|
|
s.sftpBag = system.NewContextBag(s.Context())
|
|
}
|
|
|
|
return s.sftpBag
|
|
}
|