Minimize blocking in Filesystem.getCachedDiskUsage (#53)

This commit is contained in:
CyberKitsune
2020-08-31 20:27:41 -07:00
committed by GitHub
parent 5f1d9ff151
commit d742acf308
8 changed files with 45 additions and 25 deletions

View File

@@ -261,7 +261,7 @@ func (h *Handler) HandleInbound(m Message) error {
// Only send the current disk usage if the server is offline, if docker container is running,
// Environment#EnableResourcePolling() will send this data to all clients.
if state == environment.ProcessOfflineState {
_ = h.server.Filesystem.HasSpaceAvailable()
_ = h.server.Filesystem.HasSpaceAvailable(false)
b, _ := json.Marshal(h.server.Proc())
h.SendJson(&Message{