close uncomplete when socket disconnect, see Issue #280

This commit is contained in:
Cloud Wu
2015-05-29 21:11:02 +08:00
parent 07dbfd8651
commit 24f6994b50
5 changed files with 44 additions and 7 deletions

View File

@@ -104,7 +104,11 @@ while true do
dispatch_package()
local cmd = socket.readstdin()
if cmd then
send_request("get", { what = cmd })
if cmd == "quit" then
send_request("quit")
else
send_request("get", { what = cmd })
end
else
socket.usleep(100)
end