소스 검색

Make not connected errors in sync handling non-fatal

Tulir Asokan 6 년 전
부모
커밋
3f13e13d36
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      custompuppet.go

+ 2 - 1
custompuppet.go

@@ -137,7 +137,8 @@ func (puppet *Puppet) stopSyncing() {
 
 func (puppet *Puppet) ProcessResponse(resp *mautrix.RespSync, since string) error {
 	if !puppet.customUser.Connected {
-		return fmt.Errorf("custom user not connected to whatsapp")
+		puppet.log.Warnln("Skipping sync processing: custom user not connected to whatsapp")
+		return nil
 	}
 	for roomID, events := range resp.Rooms.Join {
 		portal := puppet.bridge.GetPortalByMXID(roomID)