fix out of order call to stop the reactor before allowing the transport to flush. This fixes #14.