[Box Backup-dev] Fwd: Bandwidth usage patch
Martin Ebourne
boxbackup-dev@fluffy.co.uk
Mon, 13 Feb 2006 10:26:23 +0000
On Mon, 2006-02-13 at 09:37 +0000, Ben Summers wrote:
> Pascal has sent me the patch below. While it's not a completely
> correct solution (as it ignored SSL overhead), shall we add it in to
> the next release?
Here are my contradictory thoughts on the matter:
- We should be in feature freeze or we'll never get 0.10 out. We don't
want to end up like Emacs which hasn't had a release in several years.
They've been "preparing the release" for 18 months and in "feature
freeze" for a year. Hmm.
- But this patch is quite contained and looks very safe. It's worthwhile
extra functionality and we don't seem to be in a state to release
imminently (we will certainly need another release candidate) so I'd put
it in 0.10.
> > + try
> > + {
> > + server.DoServer(context);
> > + LogConnectionStats(clientCommonName.c_str(), rStream);
> > + }
> > + catch(...)
> > + {
> > + LogConnectionStats(clientCommonName.c_str(), rStream);
> > + throw;
> > + }
This bit is wrong. If LogConnectionStats throws an exception the last
thing you want to do is call it again in the catch block. Should look
like so:
> > + try
> > + {
> > + server.DoServer(context);
> > + }
> > + catch(...)
> > + {
> > + LogConnectionStats(clientCommonName.c_str(), rStream);
> > + throw;
> > + }
> > + LogConnectionStats(clientCommonName.c_str(), rStream);
Cheers,
Martin.