Make the handlers take a `&Socket` rather than an `Arc<Socket>`
Totodore opened this issue · comments
Théodore Prévot commented
it would be a lot more user friendly to give a &Socket
to the user rather than an Arc<Socket>
because thanks to that the user cannot clone the Arc
and hold a ref that would lead to a memory leak if he doesn't drop the ref when the socket is disconnecting.
It should be the same with socket references returned by the io
struct calls.