Dont send server logs if server is not running

This commit is contained in:
Dane Everitt 2019-09-05 23:05:47 -07:00
parent 64f477f423
commit 806afc6ed6
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -155,6 +155,10 @@ func (wsh *WebsocketHandler) HandleInbound(m WebsocketMessage) error {
} }
case SendServerLogsEvent: case SendServerLogsEvent:
{ {
if running, _ := wsh.Server.Environment.IsRunning(); !running {
return nil
}
logs, err := wsh.Server.Environment.Readlog(1024 * 16) logs, err := wsh.Server.Environment.Readlog(1024 * 16)
if err != nil { if err != nil {
return err return err