raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=38faeacee1a1aa10eabebb52edfaf91e2a2c158b

commit 38faeacee1a1aa10eabebb52edfaf91e2a2c158b
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Tue May 5 19:28:14 2015 +0900

    ecore - ecore_pipe_wait timeout broken as it never adjusts while waiting
    
    if select gets interrupted it just waits again from the start because
    it uses loop time not "now" time. this is wrong and makes timeout
    waits possibly hang if enough things interrupt select without reading
    data. this fixes that.
    
    @fix
---
 src/lib/ecore/ecore_pipe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore/ecore_pipe.c b/src/lib/ecore/ecore_pipe.c
index 23b80d1..823f07d 100644
--- a/src/lib/ecore/ecore_pipe.c
+++ b/src/lib/ecore/ecore_pipe.c
@@ -438,7 +438,7 @@ _ecore_pipe_wait(Ecore_Pipe *p,
    FD_SET(p->fd_read, &rset);
 
    if (wait >= 0.0)
-     end = ecore_loop_time_get() + wait;
+     end = ecore_time_get() + wait;
    timeout = wait;
 
    while (message_count > 0 && (timeout > 0.0 || wait <= 0.0))
@@ -493,7 +493,7 @@ _ecore_pipe_wait(Ecore_Pipe *p,
           }
 
         if (wait >= 0.0)
-          timeout = end - ecore_loop_time_get();
+          timeout = end - ecore_time_get();
      }
 
    return total;

-- 


Reply via email to