Bug 56950 - Return success if socket is already closed
Summary: Return success if socket is already closed
Status: NEW
Alias: None
Product: APR
Classification: Unclassified
Component: APR (show other bugs)
Version: HEAD
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-10 18:52 UTC by Travis Cross
Modified: 2014-09-10 23:07 UTC (History)
2 users (show)



Attachments
Return success if socket is already closed (1.24 KB, patch)
2014-09-10 18:52 UTC, Travis Cross
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Travis Cross 2014-09-10 18:52:56 UTC
Created attachment 31991 [details]
Return success if socket is already closed

Greetings,

The attached patch, which applies cleanly to APR HEAD, addresses an issue we experienced in using APR with the FreeSWITCH project.  We've been running this patch in FreeSWITCH's version of APR for years and would like to see it included upstream if possible.  Please let us know your thoughts and if any changes are appropriate we'll be happy to make them and propose a revised patch.

The patch series being proposed here is also available on the master branch of this repository:

  https://github.com/traviscross/apr/

Author: Anthony Minessale <anthm@freeswitch.org>
Date:   Tue Aug 27 13:59:24 2013 -0400

    Return success if socket is already closed
    
    Prior to this commit, socket_cleanup would return an error if the
    socket had already been closed.  With this commit we return success
    instead.
    
    This is useful, for example, if a socket is closed manually and we
    then try to close it again as part of the cleanup of a pool.
    
    Signed-off-by: Anthony Minessale <anthm@freeswitch.org>
    Signed-off-by: Travis Cross <tc@traviscross.com>