Draft: RdpConnection: alternative for peer->Close, rename close to closeConnection
This is not a fully made solution yet, just start of something I tried.
If state is not running
or streaming
d->peer->Close
will segfault.
We need our own handling for this part to avoid segfaults.
Alternatively, we shouldnt even close connection while its still starting, and hold the client connected until its done or something else fails.
I needed to also rename close
to closeConnection
, since it was overriding the close
from <unistd.h>
,
so I couldn't close the socket manually.
From @ahiemstra
note that more importantly, the reason we are closing a connection while it's still starting is that at some point, PipeWire will start failing to create new streams
Edited by Akseli Lahtinen