Skip to content

Commit

Permalink
no-op FakeOneRttHandshakeLayer::getApplicationProtocol()
Browse files Browse the repository at this point in the history
Summary: change from throwing an error in ::getApplicationProtocol to returning a folly::none

Reviewed By: lnicco

Differential Revision: D65586021

fbshipit-source-id: 1d4be761351960dbc1e48800cdd099a7b13df0e5
  • Loading branch information
hanidamlaj authored and facebook-github-bot committed Nov 7, 2024
1 parent 332380d commit db7891b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion quic/fizz/client/test/QuicClientTransportTestUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ class FakeOneRttHandshakeLayer : public FizzClientHandshake {

std::unique_ptr<Aead> oneRttWriteCipher_;
std::unique_ptr<PacketNumberCipher> oneRttWriteHeaderCipher_;
Optional<std::string> alpn_{folly::none};

FizzCryptoFactory cryptoFactory_;
const CryptoFactory& getCryptoFactory() const override {
Expand All @@ -359,7 +360,7 @@ class FakeOneRttHandshakeLayer : public FizzClientHandshake {
"getReadRecordLayerEncryptionLevel not implemented");
}
const Optional<std::string>& getApplicationProtocol() const override {
throw std::runtime_error("getApplicationProtocol not implemented");
return alpn_;
}
void processSocketData(folly::IOBufQueue&) override {
throw std::runtime_error("processSocketData not implemented");
Expand Down

0 comments on commit db7891b

Please sign in to comment.