Subject: | Don't trigger ASSERT errors if the component is shutdown before all sockets are freed |
If you shutdown() the component while connections are still outstanding,
the destruction of those sockets will attempt to call free() for their
sockets. If ASSERT_SESSIONS is enabled, you'll get fatal errors because
the component's embedded session has been destroyed already.
People will encounter this problem. Make the shutdown order more forgiving.
One way to do it:
1. Add a SF_SHUTDOWN flag to the component's object.
2. Set SF_SHUTDOWN if the component has been shut down.
3. Check SF_SHUTDOWN from the public methods (such as free()).