fwd: Improve `source' and `target' lifecycle management.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 9 Jun 2018 16:28:14 +0000 (17:28 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 9 Jun 2018 16:28:14 +0000 (17:28 +0100)
commit57ceb980e3c55306f3f70f92604703abf132cf27
tree21142973ff3a672241ce77914b83adfb84e80d74
parent755e6619263d316dc46fa504e0c333c963ec8eaa
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.
Makefile.am
exec.c
file.c
fwd.c
fwd.h
socket.c
source.c
target.c [new file with mode: 0644]