Check is connected to server or not, before send data