You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/03/06 05:37:31 UTC

[GitHub] [apisix] zaunist commented on a change in pull request #6509: change: backport server-info to 2.10

zaunist commented on a change in pull request #6509:
URL: https://github.com/apache/apisix/pull/6509#discussion_r820183194



##########
File path: apisix/core/etcd.lua
##########
@@ -360,4 +361,19 @@ function _M.server_version()
 end
 
 
+function _M.keepalive(id)
+    local etcd_cli, _, err = new()
+    if not etcd_cli then
+        return nil, err
+    end
+
+    local res, err = etcd_cli:keepalive(id)
+    if not res then
+        return nil, err
+    end
+
+    return res, nil

Review comment:
       If I don't return nil, how can I be sure there is no 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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org