I’m using docker desktop v4.35.0, when container is started(docker compose up -d) UDP client which is in container receives packets, but after few minutes when system went into idle (windows lock /sleep or inactive for few minutes), UDP port stopped receiving packets even though server is sending the packets.
This issue is sporadic and reproduced sometimes by starting the container and locking the windows. Once this issue occurs , tried reopening the port programmatically when socket exception occurs , but still the issue persists. But when the container is restarted, the packets are receiving as expected.
Configured the Windows sleep and power settings to keep network connections alive even when the system is locked. Applied Sleep to “Never” to ensure that the network is maintained during sleep.
Checked the network adapter’s power management settings in device manager.
Project Architecture is not allowed to set --network host in the Docker Compose setup. Ports are correctly exposed and mapped in Docker.
The issue is not occurring when heartbeat message sent to the server from the same UDP port in docker. But this is not the desired solution which we looking for, since current design doesn’t support this
Is there any other workaround that can fix this issue ?