Bugfix: move request_written update *before* _xcb_conn_wait in _xcb_out_flush. Otherw...
authorJamey Sharp <jamey@minilop.net>
Thu, 23 Feb 2006 07:38:16 +0000 (23:38 -0800)
committerJamey Sharp <jamey@minilop.net>
Thu, 23 Feb 2006 07:38:16 +0000 (23:38 -0800)
src/xcb_out.c

index 80d7108..0afabc2 100644 (file)
@@ -269,9 +269,9 @@ int _xcb_out_write_block(XCBConnection *c, struct iovec *vector, size_t count)
 int _xcb_out_flush(XCBConnection *c)
 {
     int ret = 1;
+    c->out.request_written = c->out.request;
     while(ret > 0 && (c->out.queue_len || c->out.vec_len))
         ret = _xcb_conn_wait(c, /*should_write*/ 1, &c->out.cond);
-    c->out.request_written = c->out.request;
     pthread_cond_broadcast(&c->out.cond);
     return ret;
 }