membphis commented on a change in pull request #1356: Updating TCP logger to 
use the batch processor util
URL: https://github.com/apache/incubator-apisix/pull/1356#discussion_r399891409
 
 

 ##########
 File path: lua/apisix/plugins/tcp-logger.lua
 ##########
 @@ -59,21 +59,21 @@ local function send_tcp_data(conf, log_message)
     local sock, soc_err = tcp()
 
     if not sock then
-        return nil, "failed to init the socket" .. soc_err
+        return false, "failed to init the socket" .. soc_err
     end
 
-    sock:settimeout(conf.timeout * 1000)
+    sock:settimeout(conf.timeout)
 
     local ok, err = sock:connect(conf.host, conf.port)
     if not ok then
-        return nil, "failed to connect to TCP server: host[" ..
+        return false, "failed to connect to TCP server: host[" ..
             conf.host .. "] port[" .. tostring(conf.port) .. "] err: " .. err
 
 Review comment:
   Bad indentation, here is good style:
   
   ```lua
           return false, "failed to connect to TCP server: host[" ..
                          conf.host .. "] port[" .. tostring(conf.port) .. "] 
err: " .. err
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to