|
@@ -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;
|