When reconnecting, close old connections to userClient/statsPage first to prevent accidental killing of outputs.
This commit is contained in:
		
							parent
							
								
									dc6b4ca0b9
								
							
						
					
					
						commit
						0bda57fa0c
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -122,7 +122,13 @@ namespace Mist { | |||
|       onFail(); | ||||
|       return; | ||||
|     } | ||||
|     if (statsPage.getData()){ | ||||
|       statsPage.finish(); | ||||
|     } | ||||
|     statsPage = IPC::sharedClient(SHM_STATISTICS, STAT_EX_SIZE, true); | ||||
|     if (userClient.getData()){ | ||||
|       userClient.finish(); | ||||
|     } | ||||
|     char userPageName[NAME_BUFFER_SIZE]; | ||||
|     snprintf(userPageName, NAME_BUFFER_SIZE, SHM_USERS, streamName.c_str()); | ||||
|     userClient = IPC::sharedClient(userPageName, PLAY_EX_SIZE, true); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Thulinma
						Thulinma