if -> while

This commit is contained in:
Tanner Nelson 2016-11-04 11:25:27 -04:00
parent cb3bad338a
commit 198d689fc8
1 changed files with 1 additions and 1 deletions

View File

@ -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
}