Only keep looping while the actor is alive
authorChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 2 Jan 2017 00:48:09 +0000 (18:48 -0600)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 2 Jan 2017 00:48:09 +0000 (18:48 -0600)
mudsync/networking.scm

index c2c1068aedf8d3dbc50a61c56bca34b82e1377dd..f12a7e0c86578927bcfa53d18eef1afb6a532ffb 100644 (file)
         (begin
           (nm-handle-line nm client client-id
                           (string-trim-right line #\return))
-          (loop))))
+          (when (actor-am-i-alive? nm)
+            (loop)))))
   (loop))
 
 (define (nm-handle-port-closed nm client client-id)