MINOR: conn-stream: Make cs_detach_* private and use cs_destroy() from outside
A conn-stream is never detached from an endpoint or an application alone,
except on a reset. Thus, to avoid any error, these functions are now
private. And cs_destroy() function is added to destroy a conn-stream. This
function is called when a stream is released, on the front and back
conn-streams, and when a health-check is finished.
diff --git a/src/check.c b/src/check.c
index 71d3f3c..c39561a 100644
--- a/src/check.c
+++ b/src/check.c
@@ -1199,8 +1199,7 @@
* the tasklet
*/
tasklet_remove_from_tasklet_list(check->wait_list.tasklet);
- cs_detach_endp(cs);
- cs_detach_app(cs);
+ cs_destroy(cs);
cs = check->cs = NULL;
conn = NULL;
}
@@ -1364,8 +1363,7 @@
check_release_buf(check, &check->bi);
check_release_buf(check, &check->bo);
if (check->cs) {
- cs_detach_endp(check->cs);
- cs_detach_app(check->cs);
+ cs_destroy(check->cs);
check->cs = NULL;
}
}