mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
add a check for aeCreateTimeEvent
1) Add a check for aeCreateTimeEvent in function initServer.
This commit is contained in:
parent
9c8be6cab9
commit
e431a97660
@ -1399,7 +1399,10 @@ void initServer() {
|
||||
server.unixtime = time(NULL);
|
||||
server.lastbgsave_status = REDIS_OK;
|
||||
server.stop_writes_on_bgsave_err = 1;
|
||||
aeCreateTimeEvent(server.el, 1, serverCron, NULL, NULL);
|
||||
if(aeCreateTimeEvent(server.el, 1, serverCron, NULL, NULL) == AE_ERR) {
|
||||
redisPanic("create time event failed");
|
||||
exit(1);
|
||||
}
|
||||
if (server.ipfd > 0 && aeCreateFileEvent(server.el,server.ipfd,AE_READABLE,
|
||||
acceptTcpHandler,NULL) == AE_ERR) redisPanic("Unrecoverable error creating server.ipfd file event.");
|
||||
if (server.sofd > 0 && aeCreateFileEvent(server.el,server.sofd,AE_READABLE,
|
||||
|
Loading…
Reference in New Issue
Block a user