1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-22 10:22:19 +00:00

Don't fail tests if the telnet module is not loaded

This commit is contained in:
Yohann D'ANELLO 2020-10-13 18:40:12 +02:00
parent 084ea676be
commit 029633d215

View File

@ -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]