When a connection is closed, the network_close function has to be invoked as it performs a number of tasks, from setting certain flags to freein up some buffers.
Currently the worker, when a connection is terminated, invokes directly the operation provided by the registered worker backend and this is causing memory leaks with TLS, among other things.
In addition, the network_channel_tls_free should never check if the context is set to NULL, if it is and the function is invoked there is a bug somewhere so better to catch, if it happens, with an assert.
When a connection is closed, the
network_close
function has to be invoked as it performs a number of tasks, from setting certain flags to freein up some buffers.Currently the worker, when a connection is terminated, invokes directly the operation provided by the registered worker backend and this is causing memory leaks with TLS, among other things.
In addition, the
network_channel_tls_free
should never check if the context is set to NULL, if it is and the function is invoked there is a bug somewhere so better to catch, if it happens, with an assert.