app: move connection code out of the loop
app: move connection code out of the loop

cezarsa/tsuru,hcxiong/tsuru,cezarsa/tsuru,hcxiong/tsuru,tsuru/tsuru,hcxiong/tsuru,gwmoura/tsuru,guilhermebr/tsuru,tsuru/tsuru,ArxdSilva/tsuru,cezarsa/tsuru,ggarnier/tsuru,Endika/tsuru,guilhermebr/tsuru,Endika/tsuru,guilhermebr/tsuru,gwmoura/tsuru,ArxdSilva/tsuru,ggarnier/tsuru,cezarsa/tsuru,ArxdSilva/tsuru,Endika/tsuru,guilhermebr/tsuru,tsuru/tsuru,ArxdSilva/tsuru,tsuru/tsuru,gwmoura/tsuru,ggarnier/tsuru,ggarnier/tsuru