Commit: 9cb1321c1e3fecbe7923384ccea0ac8b5032e1e0 Parent: cb2d7a5e5f160cde1b160aec534109f8c0bbf6de Author: Vi Grey Date: 2017-07-18 22:50 UTC Summary: Fix time delay response order bug src/modem-tap-go/telnet-client.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/modem-tap-go/telnet-client.go b/src/modem-tap-go/telnet-client.go index 7e694d9..ad1c09b 100644 --- a/src/modem-tap-go/telnet-client.go +++ b/src/modem-tap-go/telnet-client.go @@ -19,12 +19,10 @@ func client() { break } res := buf[:l] - go func() { - // Insert artificial 200ms round trip latency for added authenticity - time.Sleep(200 * time.Millisecond) - baudInBuffer = append(baudInBuffer, bytesToBuffer8N1(res)...) - readBuffer = append(readBuffer, res...) - }() + // Add incoming traffic 200ms delay for authenticity of dial up connection + time.Sleep(200 * time.Millisecond) + baudInBuffer = append(baudInBuffer, bytesToBuffer8N1(res)...) + readBuffer = append(readBuffer, res...) } if telnetOut != nil { telnetOut.Close()