Do not allow adding timers before loop is run

This commit is contained in:
Kovid Goyal
2022-08-31 21:24:13 +05:30
parent 0a2455c8be
commit dcec926590
2 changed files with 10 additions and 3 deletions

View File

@@ -203,6 +203,7 @@ func (self *Loop) run() (err error) {
self.death_signal = SIGNULL
self.escape_code_parser.Reset()
self.exit_code = 0
self.timers = make([]*timer, 0, 1)
no_timeout_channel := make(<-chan time.Time)
finalizer := ""