Skip to content

Commit

Permalink
SERVER-26086 Handle exceptions that occur while running TransportLaye…
Browse files Browse the repository at this point in the history
…r tickets
  • Loading branch information
samantharitter committed Sep 13, 2016
1 parent 05f787a commit 23640a0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/mongo/transport/transport_layer_legacy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,13 @@ Status TransportLayerLegacy::_runTicket(Ticket ticket) {
}

auto legacyTicket = checked_cast<LegacyTicket*>(getTicketImpl(ticket));
auto res = legacyTicket->_fill(amp);
Status res = Status::OK();

try {
res = legacyTicket->_fill(amp);
} catch (...) {
res = exceptionToStatus();
}

{
stdx::lock_guard<stdx::mutex> lk(_connectionsMutex);
Expand Down

0 comments on commit 23640a0

Please sign in to comment.