mirror of
https://github.com/nonoo/kappanhang.git
synced 2026-01-06 16:59:58 +01:00
Fix deinit if init not ran yet
This commit is contained in:
parent
bd5f210dd4
commit
0e881d6f32
|
|
@ -123,6 +123,10 @@ func (s *serialTCPSrv) stop() {
|
|||
}
|
||||
|
||||
s.disconnectClient()
|
||||
close(s.fromClient)
|
||||
<-s.deinitFinishedChan
|
||||
if s.fromClient != nil {
|
||||
close(s.fromClient)
|
||||
}
|
||||
if s.deinitFinishedChan != nil {
|
||||
<-s.deinitFinishedChan
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue