PaulS:
How would YOU manage the problem? You have two servers, server1 and server2, NOT server and server2, that you want data from.What I would do is connect to server1, get the data, and do something with it. Then, I'd connect to server2, get the data, and do something with it.
But, your code has some real problems, aside from the poor names and blocking nature.
while (client.available() > 0) {
char c = client2.read();
Serial.print(c);
}
While client(1) has data, it doesn't make sense to read from client2.
i got it to reconnect to server2 by changing that to this
void loop(void) {
EthernetClient client2;
delay(1000);
if (client2.connect(server2, 23)) {
if(client2.available() == 0) delay(5000);
// get the response
while (client2.available() > 0) {
char c = client2.read();
Serial.print(c);
however now i have to figure out how to log server2's data to a text file on the sdcard. its a job for tomorrow. so far i have it working with blueiris to setup my "half ass" text overlays. it works great for updating the temp and humidity overlay on the camera screen. but i would still like some additional data for my liking. hopefully when/if i get server 2 running correctly i can figure out how to organize the variables in the text file