chiark / gitweb /
fwd: Improve `source' and `target' lifecycle management.
* Add reference counts and functions for handling them to `source' and
`target'.
* Use these instead of poking the `destroy' methods directly.
* Introduce a new `source' method, `shutdown', to disentangle the
source from the machinery, and use this in `source_killall'.
This fixes a bug in socket sources with a connection limit: if an
endpoint closes during graceful shutdown, then the endpoint tries to
get the dead source to resume listening, and things go south quickly.