diff --git a/stream/telnet/telnet.go b/stream/telnet/telnet.go index 83ecc7d..d14024f 100644 --- a/stream/telnet/telnet.go +++ b/stream/telnet/telnet.go @@ -122,7 +122,7 @@ func Serve(config *Options) { // GetNumberConnectedSessions returns the numbers of clients that are viewing the stream through a telnet shell func GetNumberConnectedSessions(streamID string) int { - if !Cfg.Enabled { + if Cfg == nil || !Cfg.Enabled { return 0 } return clientCount[streamID]