From 1b7d661abdcc876a62c37bbbd88afbfe424b1c8e Mon Sep 17 00:00:00 2001 From: Solderpunk Date: Sun, 9 Apr 2023 14:24:39 +0200 Subject: [PATCH] Type trashing to fix last commit. --- handler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handler.go b/handler.go index b9ca833..c5cdee0 100644 --- a/handler.go +++ b/handler.go @@ -409,7 +409,8 @@ func serveFile(path string, info os.FileInfo, logEntry *LogEntry, conn net.Conn, // Prepare to close the connection *without* TLS Close Notify so the client // knows something has gone wrong! tlsConn, _ := conn.(*tls.Conn) - tcpConn := tlsConn.NetConn() + netConn := tlsConn.NetConn() + tcpConn := netConn.(*net.TCPConn) remoteAddr := conn.RemoteAddr().String() if errors.Is(err, os.ErrDeadlineExceeded) { log.Println("Writing to " + remoteAddr + " timed out.")