mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
event_add return 1 when failed
This commit is contained in:
@@ -278,7 +278,7 @@ gate_init(struct gate *g , struct skynet_context * ctx, char * parm) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (max <=0 ) {
|
if (max <=0 ) {
|
||||||
skynet_error(ctx, "Need max conntection");
|
skynet_error(ctx, "Need max connection");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (header != 'S' && header !='L') {
|
if (header != 'S' && header !='L') {
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ mread_create(uint32_t addr, int port , int max , int buffer_size) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event_add(efd, listen_fd, LISTENSOCKET) == -1) {
|
if (event_add(efd, listen_fd, LISTENSOCKET)) {
|
||||||
close(listen_fd);
|
close(listen_fd);
|
||||||
close(efd);
|
close(efd);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user