WiFi shield weak connection

Hi guys!

I am facing some problems with my R3 wifi shield again. I am trying to send data to ThingSpeak using Arduino Uno and WiFi shield. My problem is that not every POST request reaches the ThingSpeak. I wonder if connection streingth has something to do with this. My networks rssi is between -78 and -88. Is there some way to make sure the request reaches the server?For example adding delays somewhere? Also for my final purpose it would be useful if the connection to server would success in first try.

Here is example code im running:

#include <WiFi.h>
#include <SPI.h>
WiFiClient client;

int data=-50;
char ssid[] = "xxxxxxxxx"; //your ssid

int status = WL_IDLE_STATUS;     // the Wifi radio's status

String writeAPIKey = "xxxxxxxxxxxxxxxx"; //your api key


int failedCounter = 0;
long lastConnectionTime = 0; 
boolean lastConnected = false;
const int updateThingSpeakInterval = 20 * 1000;

void setup() {
  //Initialize serial and wait for port to open:
  Serial.begin(9600);
  
  pinMode(4, OUTPUT);
  digitalWrite(4, HIGH); //WIFIs SD chipselect not active
  pinMode(10, OUTPUT);
  digitalWrite(10, HIGH); //WiFi chipselect not active
 
  // check for the presence of the shield:
  if(WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");
    // don't continue:
    while(true);
  }
 // attempt to connect to Wifi network:
  while ( status != WL_CONNECTED) {
    Serial.print("Attempting to connect to open SSID: ");
    Serial.println(ssid);
    status = WiFi.begin(ssid);

    // wait 10 seconds for connection:
    delay(10000);
    
  }
   

  Serial.print("You're connected to the network\n");
  IPAddress ip = WiFi.localIP();
  Serial.print(F("IP Address: "));
  Serial.println(ip);
  Serial.print(F("Firmware version: "));
  Serial.println(WiFi.firmwareVersion());  
}
void loop(){
  // Print Update Response to Serial Monitor

  while (client.connected()){
    while (client.available())
    {
      char c = client.read();
      Serial.print(c);
    }
  }
  // Disconnect from ThingSpeak
  if (!client.connected() && lastConnected)
  {
    Serial.println("\n...disconnected");
    Serial.println();
    
    client.stop();
  }
  
  // Update ThingSpeak
  if(!client.connected() && (millis() - lastConnectionTime > updateThingSpeakInterval))
  {
    data = data + 10;
    updateThingSpeak("field1="+String(millis()*millis()-data)+"&field2="+String(millis())+"&field3="+String(failedCounter));
  }
  lastConnected = client.connected();
  
}
void updateThingSpeak(String tsData)
{ 
  
  if (client.connect("api.thingspeak.com", 80)==1)
  {         

    Serial.println("Connected to ThingSpeak. Making HTTP request...");
    client.print("POST /update HTTP/1.1\n");
    client.print("Host: api.thingspeak.com\n");
    client.print("Connection: close\n");
    client.print("X-THINGSPEAKAPIKEY: "+writeAPIKey+"\n");
    client.print("Content-Type: application/x-www-form-urlencoded\n");
    client.print("Content-Length: ");
    client.print(tsData.length());
    client.print("\n\n");

    client.print(tsData);
    
    Serial.println("POST request has been sent");
    
    lastConnectionTime = millis();
    
    
    if (client.connected())
    {
      Serial.println("Connecting to ThingSpeak...");
      Serial.println();
      
      failedCounter = 0;
    }
    else
    {
      failedCounter++;
  
      Serial.println("Connection to ThingSpeak failed ("+String(failedCounter, DEC)+")");   
      Serial.println();
    }
    
  }
  
  else
  {
    failedCounter++;
    
    Serial.println("Connection to ThingSpeak Failed ("+String(failedCounter, DEC)+")");   
    Serial.println();
    
    lastConnectionTime = millis(); 
  }
}

I am using Arduino Uno R3 with official R3 WiFi shield firmware version 1.1.0.

Please feel free to suggest any ideas also the obvious since I am not yet an expert with this.

Thanks