Problem while attaching new bridged networks to a running container that have ports exposed in host

Hi, I have a container that exposes some ports to the host (web and other custom ports), and everything works as expected in the first moment. However, when I attach a bridged network to the running container, the web server stop serving content (connection refused). But everything works as expected if I restart the container (both exposing the ports and attaching to the bridged network. What is the problem?