Add missing serial TCP server client deinit handling

This commit is contained in:
Nonoo 2020-11-08 16:46:05 +01:00
parent c325dbfd1c
commit f64d9018f6

View file

@ -115,6 +115,9 @@ connected:
writeLoopDeinitNeededChan <- true
<-writeLoopDeinitFinishedChan
<-s.clientLoopDeinitNeededChan
s.clientLoopDeinitFinishedChan <- true
}
func (s *serialTCPSrvStruct) loop() {
@ -124,6 +127,9 @@ func (s *serialTCPSrvStruct) loop() {
s.disconnectClient()
s.deinitClient()
s.clientLoopDeinitNeededChan = make(chan bool)
s.clientLoopDeinitFinishedChan = make(chan bool)
if err != nil {
if err != io.EOF {
reportError(err)