mirror of
https://github.com/nonoo/kappanhang.git
synced 2025-12-06 08:02:00 +01:00
Add missing serial TCP server client deinit handling
This commit is contained in:
parent
c325dbfd1c
commit
f64d9018f6
|
|
@ -115,6 +115,9 @@ connected:
|
||||||
|
|
||||||
writeLoopDeinitNeededChan <- true
|
writeLoopDeinitNeededChan <- true
|
||||||
<-writeLoopDeinitFinishedChan
|
<-writeLoopDeinitFinishedChan
|
||||||
|
|
||||||
|
<-s.clientLoopDeinitNeededChan
|
||||||
|
s.clientLoopDeinitFinishedChan <- true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *serialTCPSrvStruct) loop() {
|
func (s *serialTCPSrvStruct) loop() {
|
||||||
|
|
@ -124,6 +127,9 @@ func (s *serialTCPSrvStruct) loop() {
|
||||||
s.disconnectClient()
|
s.disconnectClient()
|
||||||
s.deinitClient()
|
s.deinitClient()
|
||||||
|
|
||||||
|
s.clientLoopDeinitNeededChan = make(chan bool)
|
||||||
|
s.clientLoopDeinitFinishedChan = make(chan bool)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err != io.EOF {
|
if err != io.EOF {
|
||||||
reportError(err)
|
reportError(err)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue