Refactor connection task management to avoid cancels (#117)
authorCory Johns <johnsca@gmail.com>
Thu, 27 Apr 2017 20:27:32 +0000 (16:27 -0400)
committerPete Vander Giessen <petevg@gmail.com>
Thu, 27 Apr 2017 20:27:32 +0000 (16:27 -0400)
Connections in libjuju require a few tasks to help manage the data
flowing through it.  The model AllWatcher task, the connection packet
receiver, and the connection keep-alive pinger.  Due to how these
connections were being managed, they had to be tracked and cancelled
externally, leading to exceptions being masked and the need to shield
AllWatcher notifier callbacks, making them entirely uncancellable.  This
refactor cleans that up by using events to track when the connection is
being shutdown and cleanly stopping the tasks internally.


No differences found