Fixed info_* websocket not terminating on socket close
This commit is contained in:
		
							parent
							
								
									984f5b7e29
								
							
						
					
					
						commit
						035496d198
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -786,6 +786,7 @@ namespace Mist { | |||
|     if (H.GetHeader("Upgrade") != "websocket"){return false;} | ||||
|     HTTP::Websocket ws(myConn, H); | ||||
|     if (!ws){return false;} | ||||
|     setBlocking(false); | ||||
|     //start the stream, if needed
 | ||||
|     Util::startInput(streamName, "", true, false); | ||||
| 
 | ||||
|  | @ -814,7 +815,11 @@ namespace Mist { | |||
|         if (newState == STRMSTAT_READY){ | ||||
|           stats(); | ||||
|         } | ||||
|         Util::sleep(250); | ||||
|         if (myConn.spool() && ws.readFrame()){ | ||||
|           onWebsocketFrame(); | ||||
|         }else{ | ||||
|           Util::sleep(250); | ||||
|         } | ||||
|         if (newState == STRMSTAT_READY && (++metaCounter % 4) == 0){ | ||||
|           updateMeta(); | ||||
|         } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Thulinma
						Thulinma