Fix potential crash caused by HTTP timeout