diff --git a/tcp/forwarder.go b/tcp/forwarder.go index 095d1d6..c586d79 100644 --- a/tcp/forwarder.go +++ b/tcp/forwarder.go @@ -290,9 +290,11 @@ func (f *SAMForwarder) forward(conn *sam3.SAMConn) { //(conn net.Conn) { } else { defer client.Close() defer conn.Close() - if val, ok := f.Bytes[f.ClientBase64(conn)]; ok == true { - if val > f.ByteLimit { - return + if f.ByteLimit > 0 { + if val, ok := f.Bytes[f.ClientBase64(conn)]; ok == true { + if val > f.ByteLimit { + return + } } } if count, err := io.Copy(client, conn); err == nil {