mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 17:27:39 +02:00
Get correct stacktraces for goroutine panics
This commit is contained in:
@@ -394,7 +394,7 @@ func (self *Loop) run() (err error) {
|
||||
self.write_msg_id_counter = 0
|
||||
write_done_channel := make(chan IdType)
|
||||
self.wakeup_channel = make(chan byte, 256)
|
||||
self.panic_channel = make(chan any)
|
||||
self.panic_channel = make(chan error)
|
||||
self.pending_writes = make([]write_msg, 0, 256)
|
||||
err_channel := make(chan error, 8)
|
||||
self.death_signal = SIGNULL
|
||||
@@ -565,7 +565,7 @@ func (self *Loop) run() (err error) {
|
||||
select {
|
||||
case <-timeout_chan:
|
||||
case p := <-self.panic_channel:
|
||||
panic(p)
|
||||
return p
|
||||
case <-self.wakeup_channel:
|
||||
for len(self.wakeup_channel) > 0 {
|
||||
<-self.wakeup_channel
|
||||
|
||||
Reference in New Issue
Block a user