comment logs

This commit is contained in:
bel
2026-02-04 00:15:27 -07:00
parent b867d81984
commit 503d078b78

View File

@@ -34,7 +34,7 @@ func adapt(ctx context.Context, config Config, conn net.Conn) error {
}
var reply []byte
if err := config.WithConn(hashKey, func(forwardConn net.Conn) error {
log.Printf("forwarding %q", raw)
//log.Printf("forwarding %q", raw)
written := 0
for written < len(raw) {
@@ -46,9 +46,9 @@ func adapt(ctx context.Context, config Config, conn net.Conn) error {
}
replyer := bufio.NewReader(forwardConn)
log.Printf("reading reply to %q", raw)
//log.Printf("reading reply to %q", raw)
reply, _, err = readMessage(replyer)
log.Printf("read reply %q", raw)
//log.Printf("read reply %q", raw)
return err
}); err != nil {
return true, err
@@ -61,7 +61,7 @@ func adapt(ctx context.Context, config Config, conn net.Conn) error {
return true, err
}
written += more
log.Printf("replied %v of %v...", written, len(reply))
//log.Printf("replied %v of %v...", written, len(reply))
}
}
@@ -114,7 +114,7 @@ func _readMessage(reader *bufio.Reader) ([]byte, []any, error) {
if err != nil {
return w.Bytes(), nil, fmt.Errorf("num not a num in %q: %q: %w", w.Bytes(), firstLine, err)
}
log.Printf("reading %v+2 bytes for bulk string", n)
//log.Printf("reading %v+2 bytes for bulk string", n)
nextLine := make([]byte, n+2)
nAt := 0
for nAt < n+2 {