From ebf216e91ef2ae54d378234062db949d95f01c0d Mon Sep 17 00:00:00 2001
From: Maria Scott <maria-12648430@hnc-agency.org>
Date: Thu, 9 Sep 2021 09:39:39 +0200
Subject: Mention that ranch_ssl must be used after socket upgrade

---
 doc/src/guide/transports.asciidoc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'doc/src/guide/transports.asciidoc')

diff --git a/doc/src/guide/transports.asciidoc b/doc/src/guide/transports.asciidoc
index 9167225..73747fd 100644
--- a/doc/src/guide/transports.asciidoc
+++ b/doc/src/guide/transports.asciidoc
@@ -153,9 +153,12 @@ A connected TCP socket can be upgraded to a SSL socket via the function
 before telling the client that the server is ready to upgrade in order
 to avoid race conditions.
 
+IMPORTANT: The new socket received from `ranch_ssl:handshake/3` must be
+used via the `ranch_ssl` transport.
+
 .Performing a TLS handshake on a TCP socket
 [source,erlang]
-{ok, NewSocket} = ranch_ssl:handshake(Socket, SslOpts, 5000).
+{ok, SslSocket} = ranch_ssl:handshake(TcpSocket, SslOpts, 5000).
 
 === Writing a transport handler
 
-- 
cgit v1.2.3

