From 198d689fc8c12a448e32725c7b4ac7d2fdaf9b68 Mon Sep 17 00:00:00 2001 From: Tanner Nelson Date: Fri, 4 Nov 2016 11:25:27 -0400 Subject: [PATCH] if -> while --- websockets/droplet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websockets/droplet.md b/websockets/droplet.md index bc103fe1..309d8573 100644 --- a/websockets/droplet.md +++ b/websockets/droplet.md @@ -18,7 +18,7 @@ drop.socket("ws") { req, ws in // ping the socket to keep it open try background { - if ws.state == .open { + while ws.state == .open { try? ws.ping() drop.console.wait(seconds: 10) // every 10 seconds }