fix: Protect circular buffer during close in reconnectingPTY (#3646)

This commit is contained in:
Mathias Fredriksson
2022-08-23 16:07:31 +00:00
committed by GitHub
parent 49de44c76d
commit 5025fe2fa0
+2
View File
@@ -801,7 +801,9 @@ func (r *reconnectingPTY) Close() {
_ = conn.Close()
}
_ = r.ptty.Close()
r.circularBufferMutex.Lock()
r.circularBuffer.Reset()
r.circularBufferMutex.Unlock()
r.timeout.Stop()
}