{"action":"created","issue":{"url":"https://api.github.com/repos/cloudwu/skynet/issues/406","labels_url":"https://api.github.com/repos/cloudwu/skynet/issues/406/labels{/name}","comments_url":"https://api.github.com/repos/cloudwu/skynet/issues/406/comments","events_url":"https://api.github.com/repos/cloudwu/skynet/issues/406/events","html_url":"https://github.com/cloudwu/skynet/pull/406","id":120608696,"number":406,"title":"服务器执行shutdown流程关闭gate服务后，后续的客户端登入会使login服务报错。","user":{"login":"linse073","id":1315571,"avatar_url":"https://avatars.githubusercontent.com/u/1315571?v=3","gravatar_id":"","url":"https://api.github.com/users/linse073","html_url":"https://github.com/linse073","followers_url":"https://api.github.com/users/linse073/followers","following_url":"https://api.github.com/users/linse073/following{/other_user}","gists_url":"https://api.github.com/users/linse073/gists{/gist_id}","starred_url":"https://api.github.com/users/linse073/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linse073/subscriptions","organizations_url":"https://api.github.com/users/linse073/orgs","repos_url":"https://api.github.com/users/linse073/repos","events_url":"https://api.github.com/users/linse073/events{/privacy}","received_events_url":"https://api.github.com/users/linse073/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-06T05:18:10Z","updated_at":"2015-12-07T04:59:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cloudwu/skynet/pulls/406","html_url":"https://github.com/cloudwu/skynet/pull/406","diff_url":"https://github.com/cloudwu/skynet/pull/406.diff","patch_url":"https://github.com/cloudwu/skynet/pull/406.patch"},"body":"原因是fd已经是有效的，再次调用socket.start会抛出错误。所以要么使用pcall调用，要么做下判定，如下：\r\nif err ~= socket_error then\r\n skynet.error(string.format(\"invalid client (fd = %d) error = %s\", fd, err))\r\nelse\r\n socket.start(fd)\r\nend"},"comment":{"url":"https://api.github.com/repos/cloudwu/skynet/issues/comments/162412949","html_url":"https://github.com/cloudwu/skynet/pull/406#issuecomment-162412949","issue_url":"https://api.github.com/repos/cloudwu/skynet/issues/406","id":162412949,"user":{"login":"linse073","id":1315571,"avatar_url":"https://avatars.githubusercontent.com/u/1315571?v=3","gravatar_id":"","url":"https://api.github.com/users/linse073","html_url":"https://github.com/linse073","followers_url":"https://api.github.com/users/linse073/followers","following_url":"https://api.github.com/users/linse073/following{/other_user}","gists_url":"https://api.github.com/users/linse073/gists{/gist_id}","starred_url":"https://api.github.com/users/linse073/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linse073/subscriptions","organizations_url":"https://api.github.com/users/linse073/orgs","repos_url":"https://api.github.com/users/linse073/repos","events_url":"https://api.github.com/users/linse073/events{/privacy}","received_events_url":"https://api.github.com/users/linse073/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T04:59:35Z","updated_at":"2015-12-07T04:59:35Z","body":"之前patch里面的loginserver.lua中的这段代码：\r\nskynet.dispatch(\"lua\", function(_,_,...)\r\n    local ok, msg, len = pcall(auth_fd, ...)\r\n    if ok then\r\n        return skynet.ret(msg,len)\r\n    else\r\n        return skynet.ret(skynet.pack(false, msg))\r\n    end\r\nend)\r\n这里面的两个return是否有什么意义？"}}