From 6e9bb2a5f84540163a6eb6141a915bd268fae8ab Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Wed, 18 Jan 2023 21:40:02 -0500 Subject: [PATCH] Adressing response time errors. --- app/VideoWeb/Invidious.class.st | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/VideoWeb/Invidious.class.st b/app/VideoWeb/Invidious.class.st index 5688035..f2114a0 100644 --- a/app/VideoWeb/Invidious.class.st +++ b/app/VideoWeb/Invidious.class.st @@ -155,11 +155,14 @@ Invidious >> region: countryISOCode [ { #category : #accessing } Invidious >> responseTime [ - ^ [ ZnClient new + | responseEvaluation | + responseEvaluation := [ ZnClient new beOneShot; url: self uri; get; - response ] timeToRun + response ]. + [ ^ responseEvaluation timeToRun ] onErrorDo: [ ^ 1 class maxVal asDuration "Internal convention for max duration when an error raises." ]. + ] { #category : #accessing }