Skip snapshot caching in case of error
This commit is contained in:
@@ -60,6 +60,9 @@ func handlerKeyframe(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
|
if b == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
entry = cacheEntry{payload: b, timestamp: time.Now()}
|
entry = cacheEntry{payload: b, timestamp: time.Now()}
|
||||||
cacheMu.Lock()
|
cacheMu.Lock()
|
||||||
if cache == nil {
|
if cache == nil {
|
||||||
Reference in New Issue
Block a user