mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 00:40:06 +00:00 
			
		
		
		
	Hold reference to radar product manager for duration of request
- Avoids early destruction and potential recursive mutex locking
This commit is contained in:
		
							parent
							
								
									2a12b603fc
								
							
						
					
					
						commit
						5caf0edf95
					
				
					 2 changed files with 10 additions and 7 deletions
				
			
		|  | @ -1022,7 +1022,8 @@ void RadarProductManagerImpl::LoadNexradFile( | |||
| 
 | ||||
|    std::shared_ptr<wsr88d::NexradFile> nexradFile = load(); | ||||
| 
 | ||||
|    std::shared_ptr<types::RadarProductRecord> record = nullptr; | ||||
|    std::shared_ptr<types::RadarProductRecord> record  = nullptr; | ||||
|    std::shared_ptr<RadarProductManager>       manager = nullptr; | ||||
| 
 | ||||
|    bool fileValid = (nexradFile != nullptr); | ||||
| 
 | ||||
|  | @ -1045,9 +1046,7 @@ void RadarProductManagerImpl::LoadNexradFile( | |||
|          recordRadarId = request->current_radar_site(); | ||||
|       } | ||||
| 
 | ||||
|       std::shared_ptr<RadarProductManager> manager = | ||||
|          RadarProductManager::Instance(recordRadarId); | ||||
| 
 | ||||
|       manager = RadarProductManager::Instance(recordRadarId); | ||||
|       manager->Initialize(); | ||||
|       record = manager->p->StoreRadarProductRecord(record); | ||||
|    } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat