summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2022-04-07 02:16:56 +0430
committerAndreas Kling <kling@serenityos.org>2022-04-09 12:21:43 +0200
commitbd5403adf1e5427bf6932dc6ce84c3ab29ab2205 (patch)
tree54f55ef01decd69ef98de0add6f7f779678b5e80 /Userland
parente2f1da8cec15601b16afea9c2f489d5ab044ef6e (diff)
downloadserenity-bd5403adf1e5427bf6932dc6ce84c3ab29ab2205.zip
LibTLS: Mark the underlying stream as nonblock
LibTLS does not want to be blocked.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibTLS/Socket.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibTLS/Socket.cpp b/Userland/Libraries/LibTLS/Socket.cpp
index 79ba5d08a7..90f9dfb5b2 100644
--- a/Userland/Libraries/LibTLS/Socket.cpp
+++ b/Userland/Libraries/LibTLS/Socket.cpp
@@ -95,7 +95,7 @@ ErrorOr<NonnullOwnPtr<TLSv12>> TLSv12::connect(String const& host, u16 port, Opt
ErrorOr<NonnullOwnPtr<TLSv12>> TLSv12::connect(String const& host, Core::Stream::Socket& underlying_stream, Options options)
{
- StreamVariantType socket { &underlying_stream };
+ TRY(underlying_stream.set_blocking(false));
auto tls_socket = make<TLSv12>(&underlying_stream, move(options));
tls_socket->set_sni(host);
Core::EventLoop loop;