Skip to content

Commit 5025fe2

Browse files
authored
fix: Protect circular buffer during close in reconnectingPTY (#3646)
1 parent 49de44c commit 5025fe2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

agent/agent.go

+2
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,9 @@ func (r *reconnectingPTY) Close() {
801801
_ = conn.Close()
802802
}
803803
_ = r.ptty.Close()
804+
r.circularBufferMutex.Lock()
804805
r.circularBuffer.Reset()
806+
r.circularBufferMutex.Unlock()
805807
r.timeout.Stop()
806808
}
807809

0 commit comments

Comments
 (0)