diff src/c/urweb.c @ 1551:5175bed443f9

Warn about concurrency issues with message-passing
author Adam Chlipala <adam@chlipala.net>
date Sun, 28 Aug 2011 14:43:30 -0400
parents 3c0803c1acd7
children c3b5cf5c2f98
line wrap: on
line diff
--- a/src/c/urweb.c	Sun Aug 28 14:01:41 2011 -0400
+++ b/src/c/urweb.c	Sun Aug 28 14:43:30 2011 -0400
@@ -220,7 +220,6 @@
   pthread_mutex_lock(&c->lock);
   --c->refcount;
   pthread_mutex_unlock(&c->lock);
-
 }
 
 static const char begin_msgs[] = "Content-type: text/plain\r\n\r\n";
@@ -3185,7 +3184,8 @@
     delta *d = &ctx->deltas[i];
     client *c = find_client(d->client);
 
-    assert (c != NULL && c->mode == USED);
+    assert (c != NULL);
+    assert(c->mode == USED);
 
     client_send(c, &d->msgs, ctx->script.start, uw_buffer_used(&ctx->script));
   }