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?
Yes, you're completely right. Thanks for bringing this up!
Just want to mention that in KNX spec v2.1 chapter 3/8/2 section 5.4 "Hearbeat monitoring", the KNXnet/IP Server is expected to terminate connections after 120 seconds of inactivity. Thus, the blocked tunnel resource should become available again after 2 minutes and this is at least only causing temporary and transient but not permanent tunnel unavailability.
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: