Diff

net/server_select.lua @ 7043:14bc5593b97e

server_select: Forward the actual TLS handshake error message
author Kim Alvefur <zash@zash.se>
date Sun, 03 Jan 2016 17:19:14 +0100
parent 7041:aff786e7b4ce
child 7046:6b4232125f32
child 7066:7d5a1fb9bf9e
line wrap: on
line diff
--- a/net/server_select.lua	Sat Jan 02 20:42:20 2016 +0000
+++ b/net/server_select.lua	Sun Jan 03 17:19:14 2016 +0100
@@ -589,8 +589,9 @@
 						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
 		)