mirror of https://github.com/jetkvm/kvm.git
refactor: close and reset keysDownStateQueue in newSession function
This commit is contained in:
parent
e7ccb71aea
commit
44b25eb33f
|
@ -343,6 +343,9 @@ func newSession(config SessionConfig) (*Session, error) {
|
|||
session.hidQueue[i] = nil
|
||||
}
|
||||
|
||||
close(session.keysDownStateQueue)
|
||||
session.keysDownStateQueue = nil
|
||||
|
||||
if session.shouldUmountVirtualMedia {
|
||||
if err := rpcUnmountImage(); err != nil {
|
||||
scopedLogger.Warn().Err(err).Msg("unmount image failed on connection close")
|
||||
|
|
Loading…
Reference in New Issue