Esp8266 server and client thinkspeak

lcdTest.ino (4.9 KB)

I've been playing around with arduino leonardo and a ESP8266 module, managed with WiFiespAT. As I'm testing I'm trying to have a web server to read the information from my sensors and also publish it to thingspeak. the first time I connect everything works, but if I try to connect again it never answers back and it seems to be on a continuous loop.
Any ideas as to why?

Thanks