You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running knxd tag 0.14.51, using ipt driver.
If I restart knxd daemon, then the connection fails, and I have to wait some minutes until I can connect again.
This is what I found debugging:
When shutting down knxd, the EIBNetIPTunnel::stop function is executed. This function executes EIBNetIPTunnel::restart and EIBNetIPTunnel::is_stopped.
EIBNetIPTunnel::restart creates the disconnect-request packet and adds it to the send queue.
EIBNetIPTunnel::is_stopped deletes the EIBNetIPSocket, so EIBNetIPSocket::io_send_cb is not executed, and the disconnect-request packet is not sent.
Also the EIBNetIPTunnel::is_stopped is executed again in EIBNetIPTunnel's destructor.
I tried moving the deletion of the EIBNetIPSocket from is_stopped function to the EIBNetIPTunnel destructor, and with this change the disconnect packet is sent and I can reconnect successfully. But I guess I'm just delaying the deletion of the socket, maybe I should ensure somehow that io_send_cb has been executed. Or maybe EIBNetIPTunnel::is_stopped should not be executed in EIBNetIPTunnel::stop function?
Hi,
I'm running knxd tag 0.14.51, using ipt driver.
If I restart knxd daemon, then the connection fails, and I have to wait some minutes until I can connect again.
This is what I found debugging:
When shutting down knxd, the EIBNetIPTunnel::stop function is executed. This function executes EIBNetIPTunnel::restart and EIBNetIPTunnel::is_stopped.
EIBNetIPTunnel::restart creates the disconnect-request packet and adds it to the send queue.
EIBNetIPTunnel::is_stopped deletes the EIBNetIPSocket, so EIBNetIPSocket::io_send_cb is not executed, and the disconnect-request packet is not sent.
Also the EIBNetIPTunnel::is_stopped is executed again in EIBNetIPTunnel's destructor.
I tried moving the deletion of the EIBNetIPSocket from is_stopped function to the EIBNetIPTunnel destructor, and with this change the disconnect packet is sent and I can reconnect successfully. But I guess I'm just delaying the deletion of the socket, maybe I should ensure somehow that io_send_cb has been executed. Or maybe EIBNetIPTunnel::is_stopped should not be executed in EIBNetIPTunnel::stop function?
Any thoughts?
Thanks,
Hector
The text was updated successfully, but these errors were encountered: