Browse Source

Revert "Merge pull request #480 from industriousonesoft/master" #728

This reverts commit 0c988968d2d66bb20a23c8958b749762cc51ce2e, reversing
changes made to 139c5486323991d76bcf5c19a24543c1b915b925.
Paul-Louis Ageneau 2 years ago
parent
commit
ebd8c4f7c7
1 changed files with 5 additions and 20 deletions
  1. 5 20
      src/impl/dtlstransport.cpp

+ 5 - 20
src/impl/dtlstransport.cpp

@@ -156,16 +156,8 @@ void DtlsTransport::incoming(message_ptr message) {
 }
 
 bool DtlsTransport::outgoing(message_ptr message) {
-	if (message->dscp == 0) {
-		// DTLS handshake packet
-		if (state() == State::Connecting) {
-			// Set recommended high-priority DSCP value
-			// See https://www.rfc-editor.org/rfc/rfc8837.html#section-5
-			message->dscp = 18; // AF21(18), Assured Forwarding class 2, low drop probability
-		} else {
-			message->dscp = mCurrentDscp;
-		}
-	}
+	if (message->dscp == 0)
+		message->dscp = mCurrentDscp;
 
 	bool result = Transport::outgoing(std::move(message));
 	mOutgoingResult = result;
@@ -518,16 +510,9 @@ void DtlsTransport::incoming(message_ptr message) {
 }
 
 bool DtlsTransport::outgoing(message_ptr message) {
-	if (message->dscp == 0) {
-		// DTLS handshake packet
-		if (state() == State::Connecting) {
-			// Set recommended high-priority DSCP value
-			// See https://www.rfc-editor.org/rfc/rfc8837.html#section-5
-			message->dscp = 18; // AF21(18), Assured Forwarding class 2, low drop probability
-		} else {
-			message->dscp = mCurrentDscp;
-		}
-	}
+	if (message->dscp == 0)
+		message->dscp = mCurrentDscp;
+
 	bool result = Transport::outgoing(std::move(message));
 	mOutgoingResult = result;
 	return result;