diff --git a/cmd/iface/main.go b/cmd/iface/main.go index acf80d5..1f88082 100644 --- a/cmd/iface/main.go +++ b/cmd/iface/main.go @@ -23,7 +23,9 @@ func main(){ select { case receivedFrame := <- receiver: 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: fmt.Printf("[default] client with protocol '%s' exited\n", client.Protocol) closeFunc()