X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/bd7da3557dc7a17020931f5a49ed5007fa81a645..e86df5fad9aa2f280aad845adeefd239b0e944ae:/daemon.go?ds=sidebyside diff --git a/daemon.go b/daemon.go index 962070a..7945c2b 100644 --- a/daemon.go +++ b/daemon.go @@ -359,9 +359,14 @@ func daemon(ctx context.Context, out io.Writer) (err error) { logger.Info("Telegram bot started") } - return daemonServe(ctx, listener, telegram, whatsapp, schedules, func(notify func(Event)) (*TurnLoop, error) { + err = daemonServe(ctx, listener, telegram, whatsapp, schedules, func(notify func(Event)) (*TurnLoop, error) { return root.Loop(whatsapp, notify) }, agents[1:]...) + if err != nil { + return fmt.Errorf("serve daemon: %w", err) + } + + return nil } // daemonListenSocket listens on the Unix socket at path, with mode 0600. The