mirror of
https://github.com/osmarks/ngircd.git
synced 2025-01-19 12:02:52 +00:00
Proc_Close(): Only close socket if it is still valid
It could be invalid when calling Proc_Close() a 2nd time, for exmaple, which could happen when we hit a timeout doing IDENT requests :-(
This commit is contained in:
parent
9fbf592924
commit
cc06e1ff89
@ -154,7 +154,10 @@ Proc_Read(PROC_STAT *proc, void *buffer, size_t buflen)
|
||||
GLOBAL void
|
||||
Proc_Close(PROC_STAT *proc)
|
||||
{
|
||||
/* Close socket, if it exists */
|
||||
if (proc->pipe_fd >= 0)
|
||||
io_close(proc->pipe_fd);
|
||||
|
||||
Proc_InitStruct(proc);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user