Re-send queries when connections are broken