File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
rs/http_endpoints/public/src/call Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ use std::{
43
43
use tokio_util:: time:: FutureExt ;
44
44
use tower:: { util:: BoxCloneService , ServiceBuilder } ;
45
45
46
+ /// The timeout duration used when creating a subscriber for the ingres message,
47
+ /// by calling [`IngressWatcherHandle::subscribe_for_certification`].
48
+ const SUBSCRIPTION_TIMEOUT : Duration = Duration :: from_secs ( 1 ) ;
49
+
46
50
enum CallV3Response {
47
51
Certificate ( Certificate ) ,
48
52
UserError ( UserError ) ,
@@ -191,11 +195,9 @@ async fn call_sync_v3(
191
195
192
196
let message_id = ingress_submitter. message_id ( ) ;
193
197
194
- let timeout = Duration :: from_secs ( ingress_message_certificate_timeout_seconds) ;
195
-
196
198
let certification_subscriber = match ingress_watcher_handle
197
199
. subscribe_for_certification ( message_id. clone ( ) )
198
- . timeout ( timeout )
200
+ . timeout ( SUBSCRIPTION_TIMEOUT )
199
201
. await
200
202
{
201
203
Ok ( Ok ( message_subscriber) ) => Ok ( message_subscriber) ,
@@ -250,7 +252,9 @@ async fn call_sync_v3(
250
252
251
253
match certification_subscriber
252
254
. wait_for_certification ( )
253
- . timeout ( timeout)
255
+ . timeout ( Duration :: from_secs (
256
+ ingress_message_certificate_timeout_seconds,
257
+ ) )
254
258
. await
255
259
{
256
260
Ok ( ( ) ) => ( ) ,
You can’t perform that action at this time.
0 commit comments