Chore: Record start time after null check

Co-authored-by: Adam Stachowicz <saibamenppl@gmail.com>
pull/4281/head
Nelson Chan 1 month ago committed by GitHub
parent 1a2f5b6380
commit 1f62c78f4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -657,12 +657,12 @@ const parseCertificateInfo = function (info) {
* @returns {object} Object containing certificate information
*/
exports.checkCertificate = function (socket) {
let certInfoStartTime = dayjs().valueOf();
// Return null if there is no socket
if (socket === undefined || socket == null) {
return null;
}
let certInfoStartTime = dayjs().valueOf();
const info = socket.getPeerCertificate(true);
const valid = socket.authorized || false;

Loading…
Cancel
Save