mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2024-12-22 16:12:19 +00:00
Don't fail tests if the telnet module is not loaded
This commit is contained in:
parent
084ea676be
commit
029633d215
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user