fix some close on -1 issues
This commit is contained in:
parent
6ac01bdd1f
commit
782664056c
|
@ -1 +1 @@
|
|||
Wed Nov 7 10:37:54 CST 2012
|
||||
Tue Aug 27 13:58:18 EDT 2013
|
||||
|
|
|
@ -32,6 +32,10 @@ static apr_status_t socket_cleanup(void *sock)
|
|||
{
|
||||
apr_socket_t *thesocket = sock;
|
||||
|
||||
if (thesocket && thesocket->socketdes == -1) {
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
if (close(thesocket->socketdes) == 0) {
|
||||
thesocket->socketdes = -1;
|
||||
return APR_SUCCESS;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Mon Apr 16 11:52:47 CDT 2012
|
||||
Tue Aug 27 13:58:32 EDT 2013
|
||||
|
|
|
@ -100,6 +100,9 @@ int
|
|||
psf_fclose (SF_PRIVATE *psf)
|
||||
{ int retval ;
|
||||
|
||||
if (psf->filedes =- -1)
|
||||
return -1; /* already closed */
|
||||
|
||||
if (psf->virtual_io)
|
||||
return 0 ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue