client: do not purge data when reconnetion failed

This commit is contained in:
Erik Faye-Lund 2010-03-20 16:18:21 +01:00
parent 0a362b42a4
commit 88e9a4bf48

View File

@ -238,7 +238,7 @@ void sync_update(struct sync_device *d, double row)
{
if (d->sock == INVALID_SOCKET) {
d->sock = server_connect(REMOTE_HOST, REMOTE_PORT);
if (purge_and_rerequest(d))
if (d->sock != INVALID_SOCKET && purge_and_rerequest(d))
goto sockerr;
}