Fix bug when connection closes during inflate