Skip to content

Commit

Permalink
Merge pull request #201 from tomponline/tp-disconnect
Browse files Browse the repository at this point in the history
Allow Disconnect to be used to cancel ongoing Connect call
  • Loading branch information
sam-github committed Jul 11, 2023
2 parents f035778 + f911ede commit 2e3d018
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions qmp/socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ func (mon *SocketMonitor) Disconnect() error {
atomic.StoreInt32(mon.listeners, 0)
err := mon.c.Close()

for range mon.stream {
if mon.stream != nil {
for range mon.stream {
}
}

return err
Expand Down Expand Up @@ -266,7 +268,7 @@ func (mon *SocketMonitor) RunWithFile(command []byte, file *os.File) ([]byte, er
type banner struct {
QMP struct {
Capabilities []string `json:"capabilities"`
Version Version `json:"version"`
Version Version `json:"version"`
} `json:"QMP"`
}

Expand Down

0 comments on commit 2e3d018

Please sign in to comment.