diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-08-07 11:41:28 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-08-07 11:41:28 +0100 |
commit | 662145d0554de5e769b92dab2d41173a98adcee5 (patch) | |
tree | ec28311a0bce6181f248ba7b50304293ad764e44 /lualib/lua_tcp_sync.lua | |
parent | bbd88232db43d18f5e0de5a6502848d4074621c5 (diff) | |
download | rspamd-662145d0554de5e769b92dab2d41173a98adcee5.tar.gz rspamd-662145d0554de5e769b92dab2d41173a98adcee5.zip |
[Minor] Reformat all Lua code, no functional changes
Diffstat (limited to 'lualib/lua_tcp_sync.lua')
-rw-r--r-- | lualib/lua_tcp_sync.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lualib/lua_tcp_sync.lua b/lualib/lua_tcp_sync.lua index a85a3f974..f8e60446f 100644 --- a/lualib/lua_tcp_sync.lua +++ b/lualib/lua_tcp_sync.lua @@ -4,9 +4,9 @@ local lua_util = require "lua_util" local exports = {} local N = 'tcp_sync' -local tcp_sync = {_conn = nil, _data = '', _eof = false, _addr = ''} +local tcp_sync = { _conn = nil, _data = '', _eof = false, _addr = '' } local metatable = { - __tostring = function (self) + __tostring = function(self) return "class {tcp_sync connect to: " .. self._addr .. "}" end } @@ -66,7 +66,7 @@ end -- --]] function tcp_sync:read_until(pattern) - repeat + repeat local pos_start, pos_end = self._data:find(pattern, 1, true) if pos_start then local data = self._data:sub(1, pos_start - 1) @@ -196,7 +196,7 @@ function tcp_sync:shutdown() return self._conn:shutdown() end -exports.connect = function (args) +exports.connect = function(args) local is_ok, connection = rspamd_tcp.connect_sync(args) if not is_ok then return is_ok, connection |