diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-07 21:19:38 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-10 00:23:01 +1100 |
commit | 79e59d5460d838203bc79ac86c0ba529305ba2a9 (patch) | |
tree | 7a7d6c48440f02945599606494ac64424d274f58 /pkg/gui/recording.go | |
parent | ba4c3e5bc475a7819fd954985105073ba239bf9e (diff) |
add some safe goroutines
WIP
Diffstat (limited to 'pkg/gui/recording.go')
-rw-r--r-- | pkg/gui/recording.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/gui/recording.go b/pkg/gui/recording.go index 0f8f9a370..936413799 100644 --- a/pkg/gui/recording.go +++ b/pkg/gui/recording.go @@ -9,6 +9,7 @@ import ( "time" "github.com/jesseduffield/gocui" + "github.com/jesseduffield/lazygit/pkg/utils" ) func recordingEvents() bool { @@ -28,10 +29,10 @@ func (gui *Gui) replayRecordedEvents() { return } - go func() { + go utils.Safe(func() { time.Sleep(time.Second * 20) log.Fatal("20 seconds is up, lazygit recording took too long to complete") - }() + }) events, err := gui.loadRecordedEvents() if err != nil { |