I have some async function that read InputSream chunks from SocketConnection, but on next read iteration, connection get close.
This problem could be fixed when I delegate Connection with InputStream to the function, where increasing reference count. Without Connection share, it closing.
Seems my issue related with memory management in Rust - it drop the connection because destroy last reference in active thread. so as the solution maybe I must delegate this Connection reference everywhere to keep it alive.
Maybe it works in C without any problems. I’ve just expected that Connection reference will be holded on GTK side as long as last Stream reference alive, but seems that is different objects, not related with each other.