]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.16: document net.ErrClosed usage in crypto/tls
authorAinar Garipov <gugl.zadolbal@gmail.com>
Fri, 25 Sep 2020 10:30:18 +0000 (13:30 +0300)
committerEmmanuel Odeke <emm.odeke@gmail.com>
Sun, 27 Sep 2020 06:23:18 +0000 (06:23 +0000)
Change-Id: I130cf79b93c6456dbe87f0042209e204c4e319b2
Reviewed-on: https://go-review.googlesource.com/c/go/+/257457
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Trust: Emmanuel Odeke <emm.odeke@gmail.com>

doc/go1.16.html

index 3164acbb6dc85ce74ee1ef464bdef9876ba85aba..b2cbb58e1a96a0f698041ac58e0321c799dcb995 100644 (file)
@@ -164,6 +164,16 @@ Do not send CLs removing the interior tags from such phrases.
   TODO
 </p>
 
+<h3 id="ctypto/tls"><a href="/pkg/crypto/tls">crypto/tls</a></h3>
+
+<p><!-- CL 256897 -->
+  I/O operations on closing or closed TLS connections can now be detected using
+  the new <a href="/pkg/net/#ErrClosed">ErrClosed</a> error.  A typical use
+  would be <code>errors.Is(err, net.ErrClosed)</code>.  In earlier releases
+  the only way to reliably detect this case was to match the string returned
+  by the <code>Error</code> method with <code>"tls: use of closed connection"</code>.
+</p>
+
 <h3 id="net"><a href="/pkg/net/">net</a></h3>
 
 <p><!-- CL 250357 -->