Summary
socket egg: socket-close should track closed status
Metadata
- Id: d22ab6a65cf81180f051b451de2f8f3bf9da2e1b
- Trac id: 1007
- Type: defect
- Reporter: zbigniew
- Owner: zbigniew
- Cc:
- Status: assigned
- Component: unknown
- Estimated difficulty:
- Resolution:
- Priority: minor
- Milestone: someday
- Version:
- Changetime: 2013-04-12 08:59:39 UTC
- Created: 2013-04-12 08:59:39 UTC
- Keywords: socket egg
Description
We should probably track socket closed status, possibly by setting the fileno to #f when socket-close is called. This should prevent accidental reuse of the socket FD when it is reopened by someone else.
It's not clear whether socket-close should stop throwing an error on double-close, or if this should be done instead in socket-close*. This would be appropriate behavior to use in a finalizer. But socket-close* is targeted for (immediate) use after network error.
Also note there are a bunch of direct calls to _close_socket which might have to be corrected to track the closed state.