You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
long long aeCreateTimeEvent(aeEventLoop *eventLoop, long long milliseconds,
aeTimeProc *proc, void *clientData,
aeEventFinalizerProc *finalizerProc)
{
long long id = eventLoop->timeEventNextId++;
aeTimeEvent *te;
te = zmalloc(sizeof(*te));
if (te == NULL) return AE_ERR;
.......
}
when te structure can not be allocated, this function return a error with timeEventNextId auto incremented. i think first check whether memory allocation is successful, and then auto increment might be a better option.
The text was updated successfully, but these errors were encountered:
runrunwang
changed the title
Time event next id should auto increment if any error happened
Time event next id auto increment if any error happened
Jun 16, 2016
when te structure can not be allocated, this function return a error with timeEventNextId auto incremented. i think first check whether memory allocation is successful, and then auto increment might be a better option.
The text was updated successfully, but these errors were encountered: