** * Dismisses the WshFail Command in runtime memory on the backend */
(ctx context.Context, connName string)
| 758 | * Dismisses the WshFail Command in runtime memory on the backend |
| 759 | */ |
| 760 | func (ws *WshServer) DismissWshFailCommand(ctx context.Context, connName string) error { |
| 761 | if strings.HasPrefix(connName, "wsl://") { |
| 762 | distroName := strings.TrimPrefix(connName, "wsl://") |
| 763 | conn := wslconn.GetWslConn(distroName) |
| 764 | if conn == nil { |
| 765 | return fmt.Errorf("connection not found: %s", connName) |
| 766 | } |
| 767 | conn.ClearWshError() |
| 768 | conn.FireConnChangeEvent() |
| 769 | return nil |
| 770 | } |
| 771 | opts, err := remote.ParseOpts(connName) |
| 772 | if err != nil { |
| 773 | return err |
| 774 | } |
| 775 | conn := conncontroller.GetConn(opts) |
| 776 | if conn == nil { |
| 777 | return fmt.Errorf("connection %s not found", connName) |
| 778 | } |
| 779 | conn.ClearWshError() |
| 780 | conn.FireConnChangeEvent() |
| 781 | return nil |
| 782 | } |
| 783 | |
| 784 | func (ws *WshServer) NotifySystemResumeCommand(ctx context.Context) error { |
| 785 | log.Printf("NotifySystemResumeCommand called\n") |
nothing calls this directly
no test coverage detected