mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-23 02:00:12 +00:00
fix: kubelet CRI portforward concurrent map write on error
Changing this from value printing to just the pointer value fixes a known issue with possible "concurrent map write" errors from the Go runtime when this error occurs. This problem surfaces when the map within the struct `h.conn` is iterated over, but can be modified by other threads while this error is being logged. Phil Estes <estesp@gmail.com>
This commit is contained in:
@@ -140,7 +140,7 @@ func (h *httpStreamHandler) getStreamPair(requestID string) (*httpStreamPair, bo
|
||||
func (h *httpStreamHandler) monitorStreamPair(p *httpStreamPair, timeout <-chan time.Time) {
|
||||
select {
|
||||
case <-timeout:
|
||||
err := fmt.Errorf("(conn=%v, request=%s) timed out waiting for streams", h.conn, p.requestID)
|
||||
err := fmt.Errorf("(conn=%p, request=%s) timed out waiting for streams", h.conn, p.requestID)
|
||||
utilruntime.HandleError(err)
|
||||
p.printError(err.Error())
|
||||
case <-p.complete:
|
||||
|
||||
Reference in New Issue
Block a user