mirror of
				https://github.com/Lomanic/presence-button-web
				synced 2025-10-31 19:25:37 +00:00 
			
		
		
		
	Don't panic at runtime in case of temporary network hiccups
This commit is contained in:
		
							parent
							
								
									d3d1b1676c
								
							
						
					
					
						commit
						ef10e0fcb4
					
				
							
								
								
									
										4
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								main.go
									
									
									
									
									
								
							| @ -244,7 +244,7 @@ func syncMatrix() { | ||||
| 	go func() { // set online status every 15 seconds | ||||
| 		for { | ||||
| 			if err := matrix.SetStatus("online", "up and running"); err != nil { | ||||
| 				panic(fmt.Sprintf("error setting matrix status: %s", err)) | ||||
| 				fmt.Println("error setting matrix status:", err) | ||||
| 			} | ||||
| 			time.Sleep(15 * time.Second) | ||||
| 		} | ||||
| @ -252,7 +252,7 @@ func syncMatrix() { | ||||
| 
 | ||||
| 	for { | ||||
| 		if err := matrix.Sync(); err != nil { | ||||
| 			fmt.Println("Sync() returned ", err) | ||||
| 			fmt.Println("error syncing with matrix:", err) | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user