Init() cleanly after Close()

This commit is contained in:
Kenan Rhoton 2017-05-17 07:18:44 +02:00
parent 72304ddb9b
commit 6e522b9e10
2 changed files with 2 additions and 1 deletions

View File

@ -139,7 +139,7 @@ func NewSysEvtCh() chan Event {
return ec
}
var DefaultEvtStream = NewEvtStream()
var DefaultEvtStream *EvtStream
type EvtStream struct {
sync.RWMutex

View File

@ -33,6 +33,7 @@ func Init() error {
if err := tm.Init(); err != nil {
return err
}
DefaultEvtStream = NewEvtStream()
sysEvtChs = make([]chan Event, 0)
go hookTermboxEvt()