Close shuts down the desktop session if one is running.
()
| 532 | |
| 533 | // Close shuts down the desktop session if one is running. |
| 534 | func (a *API) Close() error { |
| 535 | a.closeMu.Lock() |
| 536 | if a.closed { |
| 537 | a.closeMu.Unlock() |
| 538 | return nil |
| 539 | } |
| 540 | a.closed = true |
| 541 | a.closeMu.Unlock() |
| 542 | |
| 543 | return a.desktop.Close() |
| 544 | } |
| 545 | |
| 546 | // decodeRecordingRequest decodes and validates a recording request |
| 547 | // from the HTTP body, returning the recording ID. Returns false if |