Status evaluated before getting tcp-ping results
Status evaluated before getting tcp-ping results
https://github.com/upptime/uptime-monitor/blob/master/src/update.ts#L116 While performing tcp-ping in update.ts, status is evaluated before pinging the website.
So this is what causes #328
Using tcp-ping instead of curl
Got pinging error ReferenceError: Cannot access 'responseTime' before initialization
at performTestOnce (/home/runner/work/_actions/jayantkatia/uptime-monitor/scripts-enabled/dist/update.js:124:38)
at Object.update (/home/runner/work/_actions/jayantkatia/uptime-monitor/scripts-enabled/dist/update.js:190:58)
Using tcp-ping instead of curl
Got result {
address: 'https://thissitedoesnotexist.koj.co',
port: 80,
attempts: 5,
avg: NaN,
max: undefined,
min: undefined,
results: [
Error: eq: 0, time: undefined, err: [Error] },
Error: eq: 1, time: undefined, err: [Error] },
Error: eq: 2, time: undefined, err: [Error] },
Error: eq: 3, time: undefined, err: [Error] },
Error: eq: 4, time: undefined, err: [Error] }
]
}
[master 0dd42ca] 🟩 Test Broken Site is up (200 in 0 ms) [skip ci] [upptime]
Reference error in the logs is due to #436 #328 is due to no checks for errors returned in the results array. Refer: #6 of tcp-ping.
upptime/uptime-monitor#157 might solve this.
So is that the solution or not? Its an old problem, tcp-ping just does not work. What does @AnandChowdhary think about this issue?
The CLA problem is to blame on github, as i see that often here, ppl that want to help cant handle it correctly, must be an implementation detail at this site. Something seems not to be clear enough.
What can we do next?