Don't shutdown TLS connection on close()
This could lead to problems when calling close on a forked socket
sink() also shutdown connection if close is requested and possible
function meta.sink(self, close)
return function(chunk, src_err)
if not chunk and not src_err and close then
+ if self.shutdown then
+ self:shutdown()
+ end
self:close()
elseif chunk and #chunk > 0 then
return self:writeall(chunk)
end
function tls_socket.close(self)
- self:shutdown()
return self.socket:close()
end