mirror of
https://github.com/sonertari/SSLproxy
synced 2024-10-31 21:20:21 +00:00
Close fds only once, thanks to @disaykin
This commit is contained in:
parent
d45e9a2f92
commit
1408e85513
@ -303,7 +303,9 @@ log_masterkey_writecb(UNUSED int level, UNUSED void *fh, UNUSED unsigned long ct
|
||||
static void
|
||||
log_masterkey_fini(void)
|
||||
{
|
||||
close(masterkey_fd);
|
||||
if (masterkey_fd != -1)
|
||||
close(masterkey_fd);
|
||||
masterkey_fd = -1;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -389,7 +391,9 @@ log_connect_writecb(UNUSED int level, UNUSED void *fh, UNUSED unsigned long ctl,
|
||||
static void
|
||||
log_connect_fini(void)
|
||||
{
|
||||
close(connect_fd);
|
||||
if (connect_fd != -1)
|
||||
close(connect_fd);
|
||||
connect_fd = -1;
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user