From 79869083465aabfcb9d9abd7f31ecfe812e3464b Mon Sep 17 00:00:00 2001 From: Kyle Nekritz Date: Wed, 27 Sep 2017 13:11:31 -0700 Subject: [PATCH] Add AsyncSocketExceptionType for early data rejection. Summary: To be used to signal that data that was sent as TLS 1.3 early data was lost. This needs its own exception type as it requires special handling (ie it should usually be retried immediately). Reviewed By: siyengar Differential Revision: D5869914 fbshipit-source-id: ca0d8ef19cb991e9d6ffe0f8c99abfb03b748ce6 --- folly/io/async/AsyncSocketException.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/folly/io/async/AsyncSocketException.h b/folly/io/async/AsyncSocketException.h index 7732b562..19aecd2f 100644 --- a/folly/io/async/AsyncSocketException.h +++ b/folly/io/async/AsyncSocketException.h @@ -40,7 +40,8 @@ class AsyncSocketException : public std::runtime_error { SSL_ERROR = 12, COULD_NOT_BIND = 13, SASL_HANDSHAKE_TIMEOUT = 14, - NETWORK_ERROR = 15 + NETWORK_ERROR = 15, + EARLY_DATA_REJECTED = 16, }; AsyncSocketException(AsyncSocketExceptionType type, @@ -100,6 +101,8 @@ class AsyncSocketException : public std::runtime_error { return "SASL handshake timeout"; case NETWORK_ERROR: return "Network error"; + case EARLY_DATA_REJECTED: + return "Early data rejected"; default: return "(Invalid exception type)"; } -- 2.34.1