  We consider the spread of a supercritical stochastic SIR (Susceptible,
Infectious, Recovered) epidemic on a configuration model random graph. We
mainly focus on the final stages of a large outbreak and provide limit results
for the duration of the entire epidemic, while we allow for non-exponential
distributions of the infectious period and for both finite and infinite
variance of the asymptotic degree distribution in the graph.
  Our analysis relies on the analysis of some subcritical continuous time
branching processes and on ideas from first-passage percolation.
  As an application we investigate the effect of vaccination with an
all-or-nothing vaccine on the duration of the epidemic. We show that if
vaccination fails to prevent the epidemic, it often -- but not always --
increases the duration of the epidemic.
