diff options
author | Steven Barth <steven@midlink.org> | 2009-03-06 16:34:26 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2009-03-06 16:34:26 +0000 |
commit | 09a18c2c31bcfe903ff3ede9654f6e351355f75e (patch) | |
tree | 76ed23de9b9aec46774fa38c360399c010043f67 /libs/nixio | |
parent | 2d49488b38052f33fc4549c63bc8ed1e1d385eec (diff) |
nixio util:
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
Diffstat (limited to 'libs/nixio')
-rw-r--r-- | libs/nixio/lua/nixio/util.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/nixio/lua/nixio/util.lua b/libs/nixio/lua/nixio/util.lua index f2ee2a27e..59bdce8f4 100644 --- a/libs/nixio/lua/nixio/util.lua +++ b/libs/nixio/lua/nixio/util.lua @@ -151,6 +151,9 @@ end 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) @@ -160,7 +163,6 @@ function meta.sink(self, close) end function tls_socket.close(self) - self:shutdown() return self.socket:close() end |