fix condition error
This commit is contained in:
parent
2d220fc34b
commit
1df592cb81
|
@ -23,7 +23,9 @@ func main(){
|
||||||
select {
|
select {
|
||||||
case receivedFrame := <- receiver:
|
case receivedFrame := <- receiver:
|
||||||
fmt.Printf("[default] received '%s'\n", receivedFrame.Payload.Buffer)
|
fmt.Printf("[default] received '%s'\n", receivedFrame.Payload.Buffer)
|
||||||
sender <- receivedFrame.Payload.Buffer[1:]
|
if receivedFrame.Payload.Length > 0 {
|
||||||
|
sender <- receivedFrame.Payload.Buffer[1:]
|
||||||
|
}
|
||||||
case closeFunc := <- closer:
|
case closeFunc := <- closer:
|
||||||
fmt.Printf("[default] client with protocol '%s' exited\n", client.Protocol)
|
fmt.Printf("[default] client with protocol '%s' exited\n", client.Protocol)
|
||||||
closeFunc()
|
closeFunc()
|
||||||
|
|
Loading…
Reference in New Issue