mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
close fd when error
This commit is contained in:
@@ -256,6 +256,7 @@ mread_create(uint32_t addr, int port , int max , int buffer_size) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if ( -1 == _set_nonblocking(listen_fd) ) {
|
if ( -1 == _set_nonblocking(listen_fd) ) {
|
||||||
|
close(listen_fd);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user