from 06/1914 until 11/1918 , he only had two leaves and he felt sure that he would not be killed in action but knew something else would happen , and he was right , he died due to the flu epidemic , just weeks before the end of the war .