mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: Protect circular buffer during close in reconnectingPTY (#3646)
This commit is contained in:
@@ -801,7 +801,9 @@ func (r *reconnectingPTY) Close() {
|
|||||||
_ = conn.Close()
|
_ = conn.Close()
|
||||||
}
|
}
|
||||||
_ = r.ptty.Close()
|
_ = r.ptty.Close()
|
||||||
|
r.circularBufferMutex.Lock()
|
||||||
r.circularBuffer.Reset()
|
r.circularBuffer.Reset()
|
||||||
|
r.circularBufferMutex.Unlock()
|
||||||
r.timeout.Stop()
|
r.timeout.Stop()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user