danielealbano / cachegrand

cachegrand - a modern data ingestion, processing and serving platform built for today's hardware
BSD 3-Clause "New" or "Revised" License
975 stars 34 forks source link

Bug fix connection close #399

Closed danielealbano closed 1 year ago

danielealbano commented 1 year ago

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.