diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-04-18 22:25:41 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-04-18 22:25:41 +0000 |
commit | e412a4d819445678b93b86cd5c9d87d148b7724e (patch) | |
tree | 7c2c9525e0481ebe900a6842c86041d3b7b45384 /lib | |
parent | 0dc9422bd9246669d7e80d8515dcfda6f46b84be (diff) |
Add debugging code for when SendStream() fails during client command.
Will hopefully help to debug Brendon Baumgartner's issue with backups not
completing and repeating over and over, due to this error:
> Apr 18 11:14:09 hosting bbackupd[18990]: WARNING: Exception thrown:
> ServerException(Protocol_BadUsage) (Sending a stream with a definite
> size of zero is not allowed in the protocol) at Protocol.cpp:703
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/server/makeprotocol.pl.in | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/server/makeprotocol.pl.in b/lib/server/makeprotocol.pl.in index 8765c301..ab6211dd 100755 --- a/lib/server/makeprotocol.pl.in +++ b/lib/server/makeprotocol.pl.in @@ -1105,8 +1105,6 @@ __E my $has_stream = obj_is_type($cmd,'StreamWithCommand'); my $argextra = $has_stream?', std::auto_ptr<IOStream> apDataStream':''; my $send_stream_extra = ''; - my $send_stream_method = $writing_client ? "SendStream" - : "SendStreamAfterCommand"; print CPP <<__E; std::auto_ptr<$reply_class> $server_or_client_class\::Query(const $request_class &rQuery$argextra) @@ -1119,7 +1117,15 @@ __E { $send_stream_extra = <<__E; // Send stream after the command - SendStream(*apDataStream); + try + { + SendStream(*apDataStream); + } + catch (BoxException &e) + { + BOX_WARNING("Failed to send stream after command: " << + rQuery.ToString() << ": " << e.what()); + } __E } |