From b0128b8ac77df82391a12a346ee759109dca3a92 Mon Sep 17 00:00:00 2001 From: amotrak Date: Tue, 9 Dec 2025 21:01:21 +0200 Subject: [PATCH] log debug messages in writeStreamReset to stderr using log.Printf --- h2_bundle.go | 2 +- http2/transport.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/h2_bundle.go b/h2_bundle.go index 30c17aea..b93a37dc 100644 --- a/h2_bundle.go +++ b/h2_bundle.go @@ -9497,7 +9497,7 @@ func (cc *http2ClientConn) writeStreamReset(streamID uint32, code http2ErrCode, // RST_STREAM there's no equivalent to GOAWAY frame's debug // data, and the error codes are all pretty vague ("cancel"). cc.wmu.Lock() - fmt.Printf("reset err %v StreamID: %v\n", code, streamID) + log.Printf("reset err %v StreamID: %v\n", code, streamID) cc.fr.WriteRSTStream(streamID, code) cc.bw.Flush() cc.wmu.Unlock() diff --git a/http2/transport.go b/http2/transport.go index ca2d6d13..74052349 100644 --- a/http2/transport.go +++ b/http2/transport.go @@ -2880,7 +2880,7 @@ func (cc *ClientConn) writeStreamReset(streamID uint32, code ErrCode, err error) // RST_STREAM there's no equivalent to GOAWAY frame's debug // data, and the error codes are all pretty vague ("cancel"). cc.wmu.Lock() - fmt.Printf("reset err: %v code: %v StreamID: %v\n", err, code, streamID) + log.Printf("reset err: %v code: %v StreamID: %v\n", err, code, streamID) cc.fr.WriteRSTStream(streamID, code) cc.bw.Flush() cc.wmu.Unlock()