File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -421,19 +421,19 @@ async fn handle_reload(
421421 let mut jwt_configs = state. jwts . write ( ) ;
422422 let mut new_configs = HashMap :: new ( ) ;
423423 for ( module_id, jwt_secret) in jwt_secrets {
424- let signing_id = jwt_configs. get ( & module_id) . map ( |cfg| cfg. signing_id ) ;
425- if signing_id. is_none ( ) {
424+ if let Some ( signing_id) = jwt_configs. get ( & module_id) . map ( |cfg| cfg. signing_id ) {
425+ new_configs. insert ( module_id. clone ( ) , ModuleSigningConfig {
426+ module_name : module_id,
427+ jwt_secret,
428+ signing_id,
429+ } ) ;
430+ } else {
426431 let error_message = format ! (
427432 "Module {module_id} signing ID not found in commit-boost config, cannot reload"
428433 ) ;
429434 error ! ( event = "reload" , ?req_id, module_id = %module_id, error = %error_message) ;
430435 return Err ( SignerModuleError :: RequestError ( error_message) ) ;
431436 }
432- new_configs. insert ( module_id. clone ( ) , ModuleSigningConfig {
433- module_name : module_id,
434- jwt_secret,
435- signing_id : signing_id. unwrap ( ) ,
436- } ) ;
437437 }
438438 * jwt_configs = new_configs;
439439 }
You can’t perform that action at this time.
0 commit comments