From 6e5ce878edd055575a0f699d735b49fc62ab642c Mon Sep 17 00:00:00 2001
From: langhuihui <178529795@qq.com>
Date: Thu, 14 Dec 2023 13:26:34 +0800
Subject: [PATCH] fix: lock map before read
---
main.go | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/main.go b/main.go
index 6086fe4..e481841 100644
--- a/main.go
+++ b/main.go
@@ -30,15 +30,18 @@ func (p *PreviewConfig) ServeHTTP(w http.ResponseWriter, r *http.Request) {
Streams.Range(func(streamPath string, stream *Stream) {
s += fmt.Sprintf("%s [ %s ]
", streamPath, streamPath, stream.GetType())
})
- s+= "