FIx memory leak if HTTP connection times out