MCPcopy Create free account
hub / github.com/diillson/chatcli / stopMCPConfigWatcher

Method stopMCPConfigWatcher

cli/cli.go:1766–1778  ·  view source on GitHub ↗

stopMCPConfigWatcher tears down the hot-reload watcher. Safe to call when no watcher was ever started.

()

Source from the content-addressed store, hash-verified

1764// stopMCPConfigWatcher tears down the hot-reload watcher. Safe to
1765// call when no watcher was ever started.
1766func (cli *ChatCLI) stopMCPConfigWatcher() {
1767 if cli.mcpWatcherDone != nil {
1768 select {
1769 case <-cli.mcpWatcherDone:
1770 default:
1771 close(cli.mcpWatcherDone)
1772 }
1773 }
1774 if cli.mcpWatcher != nil {
1775 _ = cli.mcpWatcher.Close()
1776 cli.mcpWatcher = nil
1777 }
1778}
1779
1780func (cli *ChatCLI) cleanup(ctx context.Context) {
1781 // Teardown should not be aborted if the caller's context was already

Calls 1

CloseMethod · 0.65