summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shop.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/shop.lua b/shop.lua
index 2d2973e..ad6e425 100644
--- a/shop.lua
+++ b/shop.lua
@@ -4,8 +4,10 @@ assert(sres.ok,"not ok")
ws = assert(http.websocket(sres.url))
while true do
- c=textutils.unserializeJSON(assert((ws.receive())))
+ msgtxt = assert(ws.receive(),"ws error")
+ msg = textutils.unserializeJSON(msgtxt)
print(c.type)
+ if c.type ~= "keepalive" then print(msgtxt) end
end