On 31.01.19 08:24, Andreas Schneider wrote: > On Wednesday, 30 January 2019 23:34:32 CET [email protected] wrote: >> On 30.01.19 22:50, Alberto Garcia wrote: >>> Hi, >>> >>> what about waiting to call ssh_event_remove_fd() >>> until my_channel_close_function() is reached? >> We have to remove the socket fd from the poll event in the same loop >> round when it's closed. We should avoid polling on a closed handle. >> >> It's all a question of the timing / synchronisation. > But we should not crash in any case. Which means there should probably a null > check?
Hi Andreas. The sample code is almost ready. But there's still a memory leak and I can't find it's source. It looks a bit like an overlap in the CB userdata. Or like channel callbacks of already freed channels are called ... So the result is quite unpredictable.... Sometimes it runs for quite a while without any issue. Then suddenly I get an "Received ieof for nonexistent channel 21". Or a coredump... Till
