server_select: Forward the actual TLS handshake error message
authorKim Alvefur <zash@zash.se>
Sun, 3 Jan 2016 16:19:14 +0000 (17:19 +0100)
committerKim Alvefur <zash@zash.se>
Sun, 3 Jan 2016 16:19:14 +0000 (17:19 +0100)
net/server_select.lua

index 87921df4badc579d21fa70b83cd92af02ac6f414..d9826c02e3188003963c1c87b5f7616a2f344368 100644 (file)
@@ -589,8 +589,9 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport
                                                coroutine_yield( ) -- handshake not finished
                                        end
                                end
-                               out_put( "server.lua: ssl handshake error: ", tostring(err or "handshake too long") )
-                               _ = handler and handler:force_close("ssl handshake failed")
+                               err = "ssl handshake error: " .. ( err or "handshake too long" );
+                               out_put( "server.lua: ", err );
+                               _ = handler and handler:force_close(err)
                                return false, err -- handshake failed
                        end
                )