myserver-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myserver-commit] [SCM] GNU MyServer branch, master, updated. v0.9.2-499


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. v0.9.2-499-g741d8b2
Date: Thu, 09 Jun 2011 19:41:10 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  741d8b214ba1c875bd9933346b1eadaea2f22a36 (commit)
      from  5bf75dba31068d0f78c844a58a7dee3f58a4a134 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 741d8b214ba1c875bd9933346b1eadaea2f22a36
Author: Giuseppe Scrivano <address@hidden>
Date:   Thu Jun 9 21:16:34 2011 +0200

    Socket: do not use getTicks to measure the sleep time.

diff --git a/myserver/src/base/socket/socket.cpp 
b/myserver/src/base/socket/socket.cpp
index f68093a..fef320e 100644
--- a/myserver/src/base/socket/socket.cpp
+++ b/myserver/src/base/socket/socket.cpp
@@ -343,8 +343,6 @@ int Socket::send (const char* buffer, int len, int flags)
   {
     while (1)
       {
-        /* When we can send data again?  */
-        u_long time = getTicks () + (1000 * 1024 / throttlingRate) ;
         /* If a throttling rate is specified, send chunks of 1024 bytes.  */
         ret = rawSend (buffer + (len - toSend), toSend < 1024 ?
                        toSend : 1024, flags);
@@ -353,7 +351,7 @@ int Socket::send (const char* buffer, int len, int flags)
 
         /* If there are other bytes to send wait before cycle again.  */
         if (toSend)
-          Thread::wait (getTicks () - time);
+          Thread::wait (1000 * 1024 / throttlingRate);
         else
           break;
       }

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/base/socket/socket.cpp |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU MyServer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]