mirror of
				https://github.com/louislam/uptime-kuma.git
				synced 2025-10-31 19:39:20 +08:00 
			
		
		
		
	added timeout for removing the dead loop state
This commit is contained in:
		| @@ -359,8 +359,10 @@ class Monitor extends BeanModel { | ||||
|                         }); | ||||
|                         bean.status = UP; | ||||
|                     } catch (error) { | ||||
|                         bean.status = DOWN; | ||||
|                         bean.msg = error.message; | ||||
|                         if (error.message !== "Timeout") { | ||||
|                             bean.status = DOWN; | ||||
|                             bean.msg = error.message; | ||||
|                         } | ||||
|                     } | ||||
|                 } else { | ||||
|                     bean.msg = "Unknown Monitor Type"; | ||||
|   | ||||
| @@ -131,6 +131,7 @@ exports.mqttAsync = function (hostname, topic, okMessage, options = {}) { | ||||
|  | ||||
|         setTimeout(() => { | ||||
|             client.end(); | ||||
|             reject("Timeout"); | ||||
|         }, interval * 1000); | ||||
|  | ||||
|     }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user