]> git.sesse.net Git - cubemap/commitdiff
Small microoptimization in do_work().
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 14 Apr 2013 21:41:22 +0000 (23:41 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 14 Apr 2013 21:41:22 +0000 (23:41 +0200)
server.cpp

index 730bb4463c7433c7734a49d19a9e5ea9d08331fd..a11b55f72e6f62d7e1401925e4c113a58df9ceec 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;