The ping command does nothing other than return OK, but it will be sent
in order of the `send()` call, i.e. after any previous invocation of
`send()` and since the server will return strings in order, this
guarantees that the previous `status` and `currentsong` command have
been evaluated and contain data.
local song = nil
connection:send("currentsong", function(_, s) song = s end)
- timer.start_new(0.10, function()
- if status == nil or song == nil then return true end
-
+ connection:send("ping", function()
dbg.dump(status)
dbg.dump(song)