mirror of
				https://github.com/yuezk/GlobalProtect-openconnect.git
				synced 2025-05-20 07:26:58 -04:00 
			
		
		
		
	refactor: support cancel during retry
This commit is contained in:
		| @@ -64,15 +64,20 @@ export const connectPortalAtom = atom( | ||||
|                 throw err; | ||||
|               } | ||||
|  | ||||
|               if (err instanceof AbnormalPortalConfigError) { | ||||
|                 logger.info( | ||||
|                   `Got abnormal portal config: ${err.message}, retrying...` | ||||
|                 ); | ||||
|                 prelogin = await portalService.prelogin(portal); | ||||
|                 continue; | ||||
|               } else { | ||||
|               if (!(err instanceof AbnormalPortalConfigError)) { | ||||
|                 throw err; | ||||
|               } | ||||
|  | ||||
|               logger.info( | ||||
|                 `Got abnormal portal config: ${err.message}, retrying...` | ||||
|               ); | ||||
|               set(statusAtom, "prelogin"); | ||||
|               prelogin = await portalService.prelogin(portal); | ||||
|               const isProcessing = get(isProcessingAtom); | ||||
|               if (!isProcessing) { | ||||
|                 logger.info("Operation cancelled"); | ||||
|                 break; | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         } else { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user