codership / glb

Galera Load Balancer - a simple TCP connection proxy and load-balancing library
GNU General Public License v2.0
153 stars 51 forks source link

wait for connection on local address only #33

Open xianhuazhou opened 1 year ago

xianhuazhou commented 1 year ago

Let's say glb is listening on 0.0.0.0:3306, and there is another program connecting to 192.168.1.3:3306. It doesn't work if we try restart glb in this case, E.g.: netstan -an

tcp        0      0 192.168.1.1:42388        192.168.1.3:3306         ESTABLISHED

The reason is that netstat -an | grep -m 1 ':3306' matches 192.168.1.3:3306, which is external connection.