Skip to content

Commit

Permalink
Suppress exception messages in LineBuffer::GetLine
Browse files Browse the repository at this point in the history
These exceptions are used to communicate state to the caller, and should not be
treated as errors in common cases.

(cherry picked from commit 86f3e9c)
  • Loading branch information
qris committed Jan 15, 2018
1 parent 46e96d2 commit ef12d71
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/bbackupd/BackupDaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2162,8 +2162,12 @@ void BackupDaemon::WaitOnCommandSocket(box_time_t RequiredDelay, bool &DoSyncFla
std::string command;
while(mapCommandSocketInfo->mapGetLine.get() != 0)
{
command = mapCommandSocketInfo->mapGetLine->GetLine(
false /* no preprocessing */, timeout);
{
HideExceptionMessageGuard hide_exceptions;
command = mapCommandSocketInfo->mapGetLine->GetLine(
false /* no preprocessing */, timeout);
}

BOX_TRACE("Received command '" << command << "' over command socket");

bool sendOK = false;
Expand Down
1 change: 1 addition & 0 deletions lib/bbstored/BBStoreDHousekeeping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ bool BackupStoreDaemon::CheckForInterProcessMsg(int AccountNum, int MaximumWaitT

try
{
HideExceptionMessageGuard hide_exceptions;
line = mInterProcessComms.GetLine(false /* no pre-processing */,
MaximumWaitTime);
}
Expand Down

0 comments on commit ef12d71

Please sign in to comment.