Small microoptimization in do_work().
[cubemap] / server.cpp
index 730bb44..a11b55f 100644 (file)
@@ -400,7 +400,7 @@ sending_data_again:
                        // We don't have any more data for this client, so put it to sleep.
                        // This is postcondition #3.
                        stream->put_client_to_sleep(client);
-               } else if (more_data) {
+               } else if (more_data && ret == bytes_to_send) {
                        goto sending_data_again;
                }
                break;