local sock = ngx.socket.tcp();sock:settimeout(1000);local ok ,err = sock:connect(server.host,server.port);if ok thenlocal bytes,err = sock:send('123456');if not err thenlocal ok msg = sock:setkeepalive(60,1);
if not ok thenngx.log(ngx.INFO,'setkeepalive error ' .. msg);endendend定时任务调用这段代码的的是时候 msg = 1, context: ngx.timer;请问下为什么啊?
--
--
邮件来自列表“openresty”,专用于技术讨论!
订阅: 请发空白邮件到 openresty+subscribe@googlegroups.com
发言: 请发邮件到 open...@googlegroups.com
退订: 请发邮件至 openresty+unsubscribe@googlegroups.com
归档: http://groups.google.com/group/openresty
官网: http://openresty.org/
仓库: https://github.com/agentzh/ngx_openresty
教程: http://openresty.org/download/agentzh-nginx-tutorials-zhcn.html