bridgev2/matrix: log type of interrupt
Some checks are pending
Go / Lint (latest) (push) Waiting to run
Go / Build (old, libolm) (push) Waiting to run
Go / Build (latest, libolm) (push) Waiting to run
Go / Build (old, goolm) (push) Waiting to run
Go / Build (latest, goolm) (push) Waiting to run

This commit is contained in:
Tulir Asokan 2024-12-08 23:08:45 +02:00
commit 3312a58161
2 changed files with 3 additions and 1 deletions

View file

@ -398,8 +398,10 @@ func (br *BridgeMain) WaitForInterrupt() int {
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
select {
case <-c:
br.Log.Info().Msg("Interrupt signal received from OS")
return 0
case exitCode := <-br.manualStop:
br.Log.Info().Msg("Internal stop signal received")
return exitCode
}
}

View file

@ -61,7 +61,7 @@ func (br *Connector) startWebsocket(wg *sync.WaitGroup) {
if errors.Is(err, appservice.ErrWebsocketManualStop) {
return
} else if closeCommand := (&appservice.CloseCommand{}); errors.As(err, &closeCommand) && closeCommand.Status == appservice.MeowConnectionReplaced {
log.Info().Msg("Appservice websocket closed by another instance of the bridge, shutting down...")
log.Warn().Msg("Appservice websocket closed by another instance of the bridge, shutting down...")
if br.OnWebsocketReplaced != nil {
br.OnWebsocketReplaced()
} else {