What happens when logstash can't access to elasticsearch

I want to ask that, I have logstash pipelines. Output filter only goes elasticsearch.

when elasticsearch stops while logstash is running, logstash service stops with an error but what about sincedb ?

When i restart elasticsearch, will logstash work from where it left off or will i lose the data between them ?

Yes, that is what sincedb is designed to do.