Updated usage of socket lib in accordance to socket lib edits
This commit is contained in:
		
							parent
							
								
									e90a3d60c0
								
							
						
					
					
						commit
						118978aafc
					
				
					 2 changed files with 6 additions and 6 deletions
				
			
		|  | @ -1394,8 +1394,8 @@ namespace Mist{ | |||
|       payl << config->getString("target") << '\n'; | ||||
|       payl << capa["name"].asStringRef() << '\n'; | ||||
|       payl << myConn.dataUp() << '\n'; | ||||
|       payl << (rightNow - myConn.connTime()) << '\n'; | ||||
|       payl << myConn.connTime() << '\n'; | ||||
|       payl << (Util::bootSecs() - myConn.connTime()) << '\n'; | ||||
|       payl << (rightNow - (Util::bootSecs() - myConn.connTime())) << '\n'; | ||||
|       payl << rightNow << '\n'; | ||||
|       if (firstPacketTime != 0xFFFFFFFFFFFFFFFFull){ | ||||
|         payl << (lastPacketTime - firstPacketTime) << '\n'; | ||||
|  | @ -1705,7 +1705,7 @@ namespace Mist{ | |||
|       tmpEx.connector(getStatsName()); | ||||
|       tmpEx.up(myConn.dataUp()); | ||||
|       tmpEx.down(myConn.dataDown()); | ||||
|       tmpEx.time(now - myConn.connTime()); | ||||
|       tmpEx.time(Util::bootSecs() - myConn.connTime()); | ||||
|       if (thisPacket){ | ||||
|         tmpEx.lastSecond(thisPacket.getTime()); | ||||
|       }else{ | ||||
|  | @ -1714,7 +1714,7 @@ namespace Mist{ | |||
|       /*LTS-START*/ | ||||
|       //Tag the session with the user agent
 | ||||
|       static bool newUA = true;//we only do this once per connection
 | ||||
|       if (newUA && ((now - myConn.connTime()) >= uaDelay || !myConn) && UA.size()){ | ||||
|       if (newUA && ((Util::bootSecs() - myConn.connTime()) >= uaDelay || !myConn) && UA.size()){ | ||||
|         std::string APIcall = "{\"tag_sessid\":{\"" + tmpEx.getSessId() + "\":" + JSON::string_escape("UA:"+UA) + "}}"; | ||||
|         Socket::UDPConnection uSock; | ||||
|         uSock.SetDestination(UDP_API_HOST, UDP_API_PORT); | ||||
|  |  | |||
|  | @ -493,9 +493,9 @@ namespace Mist{ | |||
|   void OutRTMP::requestHandler(){ | ||||
|     //If needed, slow down the reading to a rate of maxbps on average
 | ||||
|     static bool slowWarned = false; | ||||
|     if (maxbps && (Util::epoch() - myConn.connTime()) && myConn.dataDown() / (Util::epoch() - myConn.connTime()) > maxbps){ | ||||
|     if (maxbps && (Util::bootSecs() - myConn.connTime()) && myConn.dataDown() / (Util::bootSecs() - myConn.connTime()) > maxbps){ | ||||
|       if (!slowWarned){ | ||||
|         WARN_MSG("Slowing down connection from %s because rate of %llukbps > %llukbps", getConnectedHost().c_str(), (myConn.dataDown() / (Util::epoch() - myConn.connTime())) / 128, maxbps / 128); | ||||
|         WARN_MSG("Slowing down connection from %s because rate of %llukbps > %llukbps", getConnectedHost().c_str(), (myConn.dataDown() / (Util::bootSecs() - myConn.connTime())) / 128, maxbps / 128); | ||||
|         slowWarned = true; | ||||
|       } | ||||
|       Util::sleep(250); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Thulinma
						Thulinma