Merge pull request #32 from pterodactyl/issue/1796

Send disk usage when server is offline
This commit is contained in:
Dane Everitt
2020-05-31 10:54:21 -07:00
committed by GitHub
2 changed files with 34 additions and 4 deletions

View File

@@ -247,6 +247,10 @@ func FromConfiguration(data *api.ServerConfigurationResponse) (*Server, error) {
}
s.Resources = ResourceUsage{}
// Force the disk usage to become cached to return in a resources response
// or when connecting to the websocket of an offline server.
go s.Filesystem.HasSpaceAvailable()
// Forces the configuration to be synced with the panel.
if err := s.SyncWithConfiguration(data); err != nil {
return nil, err