Sfoglia il codice sorgente

LibTLS: Notify the client for app data as soon as some data is available

Previously we were waiting until the socket was no longer immediately
readable to notify the client, resulting in large buffers and longer
latency.
Ali Mohammad Pur 1 anno fa
parent
commit
c3167afa3a
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      Userland/Libraries/LibTLS/Record.cpp

+ 2 - 0
Userland/Libraries/LibTLS/Record.cpp

@@ -502,6 +502,8 @@ ssize_t TLSv12::handle_message(ReadonlyBytes buffer)
                 payload_res = (i8)Error::DecryptionFailed;
                 payload_res = (i8)Error::DecryptionFailed;
                 auto packet = build_alert(true, (u8)AlertDescription::DECRYPTION_FAILED_RESERVED);
                 auto packet = build_alert(true, (u8)AlertDescription::DECRYPTION_FAILED_RESERVED);
                 write_packet(packet);
                 write_packet(packet);
+            } else {
+                notify_client_for_app_data();
             }
             }
         }
         }
         break;
         break;