mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 03:53:09 +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;
|
||||
}
|
||||
if ( -1 == _set_nonblocking(listen_fd) ) {
|
||||
close(listen_fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user