openziti / sdk-golang

Ziti SDK for Golang
Apache License 2.0
100 stars 15 forks source link

examples/zping-client exhibits unexpected behavior when greater than 9 pings are sent. #177

Closed r-caamano closed 3 years ago

r-caamano commented 3 years ago

if sequence # is greater than 9 incorrect number of bytes sent for each ping due to incorrect subtraction of sequence length. Need to remove "var count" and replace with psession.psent when calculating length of random string data

ex.

Sending 100 byte pings to server01:

100 bytes from server01: ziti_seq=1 time=78.602ms 100 bytes from server01: ziti_seq=2 time=78.964ms 100 bytes from server01: ziti_seq=3 time=78.475ms 100 bytes from server01: ziti_seq=4 time=78.395ms 100 bytes from server01: ziti_seq=5 time=78.849ms 100 bytes from server01: ziti_seq=6 time=78.781ms 100 bytes from server01: ziti_seq=7 time=78.918ms 100 bytes from server01: ziti_seq=8 time=78.859ms 100 bytes from server01: ziti_seq=9 time=79.021ms 101 bytes from server01: ziti_seq=10 time=79.750ms

r-caamano commented 3 years ago

Issue fixed with pr #178