mirror of
				https://github.com/haveno-dex/haveno.git
				synced 2025-11-03 20:14:21 -05:00 
			
		
		
		
	fix shut down of trade and wallet services in seed node
This commit is contained in:
		
							parent
							
								
									58506b02f5
								
							
						
					
					
						commit
						adcd5da431
					
				
					 1 changed files with 10 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -151,23 +151,23 @@ public abstract class ExecutableForAppWithP2p extends HavenoExecutable {
 | 
			
		|||
                                UserThread.runAfter(() -> System.exit(HavenoExecutable.EXIT_SUCCESS), 1);
 | 
			
		||||
                            });
 | 
			
		||||
                        });
 | 
			
		||||
 | 
			
		||||
                        // shut down trade and wallet services
 | 
			
		||||
                        log.info("Shutting down trade and wallet services");
 | 
			
		||||
                        injector.getInstance(OfferBookService.class).shutDown();
 | 
			
		||||
                        injector.getInstance(TradeManager.class).shutDown();
 | 
			
		||||
                        injector.getInstance(BtcWalletService.class).shutDown();
 | 
			
		||||
                        injector.getInstance(XmrWalletService.class).shutDown();
 | 
			
		||||
                        injector.getInstance(XmrConnectionService.class).shutDown();
 | 
			
		||||
                        injector.getInstance(WalletsSetup.class).shutDown();
 | 
			
		||||
                    });
 | 
			
		||||
 | 
			
		||||
                    // shut down trade and wallet services
 | 
			
		||||
                    log.info("Shutting down trade and wallet services");
 | 
			
		||||
                    injector.getInstance(OfferBookService.class).shutDown();
 | 
			
		||||
                    injector.getInstance(TradeManager.class).shutDown();
 | 
			
		||||
                    injector.getInstance(BtcWalletService.class).shutDown();
 | 
			
		||||
                    injector.getInstance(XmrWalletService.class).shutDown();
 | 
			
		||||
                    injector.getInstance(XmrConnectionService.class).shutDown();
 | 
			
		||||
                    injector.getInstance(WalletsSetup.class).shutDown();
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
                // we wait max 5 sec.
 | 
			
		||||
                UserThread.runAfter(() -> {
 | 
			
		||||
                    PersistenceManager.flushAllDataToDiskAtShutdown(() -> {
 | 
			
		||||
                        resultHandler.handleResult();
 | 
			
		||||
                        log.info("Graceful shutdown caused a timeout. Exiting now.");
 | 
			
		||||
                        log.warn("Graceful shutdown caused a timeout. Exiting now.");
 | 
			
		||||
                        UserThread.runAfter(() -> System.exit(HavenoExecutable.EXIT_SUCCESS), 1);
 | 
			
		||||
                    });
 | 
			
		||||
                }, 5);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue