Nog een poging...

This commit is contained in:
Thulinma 2010-11-07 23:53:22 +01:00
parent 66b8de0a86
commit 667859d984

View file

@ -51,6 +51,8 @@ int main(){
//first timestamp set //first timestamp set
firsttime = getNowMS(); firsttime = getNowMS();
int now = getNowMS();
int lastcheck = now;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "Doing handshake...\n"); fprintf(stderr, "Doing handshake...\n");
@ -85,7 +87,8 @@ int main(){
//only parse input if available or not yet init'ed //only parse input if available or not yet init'ed
//rightnow = getNowMS(); //rightnow = getNowMS();
retval = epoll_wait(poller, events, 1, 100); retval = epoll_wait(poller, events, 1, 100);
if (retval > 0){ now = getNowMS();
if ((retval > 0) || ((now - lastcheck > 1000) && (!ready4data || (snd_cnt - snd_window_at >= snd_window_size)))){
parseChunk(); parseChunk();
fflush(CONN); fflush(CONN);
} }