From 806afc6ed64b464b420686114a0023351f2befa2 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Thu, 5 Sep 2019 23:05:47 -0700 Subject: [PATCH] Dont send server logs if server is not running --- websocket.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/websocket.go b/websocket.go index c411b9a..0bb53f8 100644 --- a/websocket.go +++ b/websocket.go @@ -155,6 +155,10 @@ func (wsh *WebsocketHandler) HandleInbound(m WebsocketMessage) error { } case SendServerLogsEvent: { + if running, _ := wsh.Server.Environment.IsRunning(); !running { + return nil + } + logs, err := wsh.Server.Environment.Readlog(1024 * 16) if err != nil { return err