Software /
code /
prosody
Comparison
net/server_select.lua @ 12542:5ec9d6913162
net.server: Fix multiple return values
return foo and foo() crops multiple return values to a single one, so
any second return values etc were last, mostly error details.
Introduced in 7e9ebdc75ce4
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 03 Jun 2022 17:51:42 +0200 |
parent | 12487:db634db8e069 |
child | 12974:ba409c67353b |
comparison
equal
deleted
inserted
replaced
12541:97af41d580f7 | 12542:5ec9d6913162 |
---|---|
361 end | 361 end |
362 handler.ssl_info = function( ) | 362 handler.ssl_info = function( ) |
363 return socket.info and socket:info() | 363 return socket.info and socket:info() |
364 end | 364 end |
365 handler.ssl_peercertificate = function( ) | 365 handler.ssl_peercertificate = function( ) |
366 return socket.getpeercertificate and socket:getpeercertificate() | 366 if not socket.getpeercertificate then return nil, "not-implemented"; end |
367 return socket:getpeercertificate() | |
367 end | 368 end |
368 handler.ssl_peerverification = function( ) | 369 handler.ssl_peerverification = function( ) |
369 return socket.getpeerverification and socket:getpeerverification() | 370 if not socket.getpeerverification then return nil, { { "Chain verification not supported" } }; end |
371 return socket:getpeerverification(); | |
370 end | 372 end |
371 handler.ssl_peerfinished = function( ) | 373 handler.ssl_peerfinished = function( ) |
372 return socket.getpeerfinished and socket:getpeerfinished() | 374 if not socket.getpeerfinished then return nil, "not-implemented"; end |
375 return socket:getpeerfinished(); | |
373 end | 376 end |
374 handler.send = function( _, data, i, j ) | 377 handler.send = function( _, data, i, j ) |
375 return send( socket, data, i, j ) | 378 return send( socket, data, i, j ) |
376 end | 379 end |
377 handler.receive = function( pattern, prefix ) | 380 handler.receive = function( pattern, prefix ) |