mirror of
https://github.com/nonoo/kappanhang.git
synced 2026-04-05 06:25:18 +00:00
Fix panic on audio stream timeout
This commit is contained in:
parent
5a40225408
commit
aeeaa981cf
4 changed files with 98 additions and 190 deletions
|
|
@ -254,7 +254,7 @@ func (s *serialStream) init(devName string) error {
|
|||
s.readFromSerialPort.frameTimeout = time.NewTimer(0)
|
||||
<-s.readFromSerialPort.frameTimeout.C
|
||||
|
||||
civControl = &civControlStruct{}
|
||||
civControl = civControlStruct{}
|
||||
if err := civControl.init(s); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -272,10 +272,7 @@ func (s *serialStream) deinit() {
|
|||
s.deinitNeededChan <- true
|
||||
<-s.deinitFinishedChan
|
||||
}
|
||||
if civControl != nil {
|
||||
civControl.deinit()
|
||||
civControl = nil
|
||||
}
|
||||
civControl.deinit()
|
||||
s.common.deinit()
|
||||
s.rxSeqBuf.deinit()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue