Skip to content

Commit c18f0c7

Browse files
committed
Check for table, not string
1 parent 1ab3ff2 commit c18f0c7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

deps/secure-socket/biowrap.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ return function (ctx, isServer, socket, handshakeComplete, servername, buffer)
110110

111111
-- When requested to write plain data, encrypt it and write to socket
112112
function ssocket.write(_, plain, callback)
113-
if type(plain) == "string" then
114-
ssl:write(plain)
115-
else
113+
if type(plain) == "table" then
116114
for i=1, #plain do
117115
ssl:write(plain[i])
118116
end
117+
else
118+
ssl:write(plain)
119119
end
120120
return flush(callback)
121121
end

0 commit comments

Comments
 (0)