From 661482b5d4b6e879ef8af25f291d03d11a012cfc Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Thu, 12 Dec 2024 14:59:36 -0500 Subject: [PATCH] fix: renderer: attempt to resolve race condition --- ferocious_renderer.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ferocious_renderer.go b/ferocious_renderer.go index 92f9b0aaa3..a734ae2ae5 100644 --- a/ferocious_renderer.go +++ b/ferocious_renderer.go @@ -33,6 +33,8 @@ func newScreenRenderer(w io.Writer, term string) (s *screenRenderer) { // close implements renderer. func (s *screenRenderer) close() (err error) { + s.mu.Lock() + defer s.mu.Unlock() return s.scr.Close() }