Browse Source

http2: change two debug log.Printf calls to vlogf

Fixes golang/go#12742

Change-Id: I04d65b0c68ccb5da5ee90650c7b0593fbdb1d470
Reviewed-on: https://go-review.googlesource.com/15736
Reviewed-by: Andrew Gerrand <adg@golang.org>
Brad Fitzpatrick 10 years ago
parent
commit
2a045c20e4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      http2/server.go

+ 2 - 2
http2/server.go

@@ -303,7 +303,7 @@ func isBadCipher(cipher uint16) bool {
 }
 
 func (sc *serverConn) rejectConn(err ErrCode, debug string) {
-	log.Printf("REJECTING conn: %v, %s", err, debug)
+	sc.vlogf("REJECTING conn: %v, %s", err, debug)
 	// ignoring errors. hanging up anyway.
 	sc.framer.WriteGoAway(0, err, []byte(debug))
 	sc.bw.Flush()
@@ -992,7 +992,7 @@ func (sc *serverConn) processFrame(f Frame) error {
 		// frame as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
 		return ConnectionError(ErrCodeProtocol)
 	default:
-		log.Printf("Ignoring frame: %v", f.Header())
+		sc.vlogf("Ignoring frame: %v", f.Header())
 		return nil
 	}
 }