@ -49,15 +49,11 @@ TR_eventDispatcherStart(TR_EventDispatcher this)
if ( this - > nextbeat & & this - > nextbeat < = now ) {
if ( this - > nextbeat & & this - > nextbeat < = now ) {
this - > nextbeat + = this - > heartbeat ;
this - > nextbeat + = this - > heartbeat ;
TR_eventDispatcherEnqueueEvent (
this ,
TR_eventSubjectEmit (
( TR_EventSubject ) this ,
TR_DISPATCHER_EVENT_HEARTBEAT ,
NULL ) ) ;
}
if ( TR_queueEmpty ( this - > events ) | | this - > nextpoll < = now ) {
event = TR_eventSubjectEmit (
( TR_EventSubject ) this ,
TR_DISPATCHER_EVENT_HEARTBEAT ,
NULL ) ;
} else if ( TR_queueEmpty ( this - > events ) | | this - > nextpoll < = now ) {
int evtid = TR_EVD_CLIENT = = this - > mode
int evtid = TR_EVD_CLIENT = = this - > mode
? TR_DISPATCHER_EVENT_USER_WAIT
? TR_DISPATCHER_EVENT_USER_WAIT
: TR_DISPATCHER_EVENT_DATA_WAIT ;
: TR_DISPATCHER_EVENT_DATA_WAIT ;