Skip to content

Commit

Permalink
More review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardnormier committed Apr 12, 2024
1 parent a9aafe4 commit c4e8206
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
4 changes: 2 additions & 2 deletions cpp/src/Ice/ConnectionI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2097,7 +2097,7 @@ Ice::ConnectionI::ConnectionI(
const TransceiverPtr& transceiver,
const ConnectorPtr& connector,
const EndpointIPtr& endpoint,
const shared_ptr<ObjectAdapterI>& adapter)
const shared_ptr<ObjectAdapterI>& adapter) noexcept
: _communicator(communicator),
_instance(instance),
_monitor(monitor),
Expand Down Expand Up @@ -2608,7 +2608,7 @@ Ice::ConnectionI::sendHeartbeatNow()
OutgoingMessage message(&os, false);
sendMessage(message);
}
catch (...)
catch (const LocalException&)
{
setState(StateClosed, current_exception());
assert(_exception);
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/Ice/ConnectionI.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ namespace Ice
const IceInternal::TransceiverPtr&,
const IceInternal::ConnectorPtr&,
const IceInternal::EndpointIPtr&,
const std::shared_ptr<ObjectAdapterI>&);
const std::shared_ptr<ObjectAdapterI>&) noexcept;

static ConnectionIPtr create(
const Ice::CommunicatorPtr&,
Expand Down
10 changes: 4 additions & 6 deletions cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,10 @@ IdleTimeoutTransceiverDecorator::initialize(Buffer& readBuffer, Buffer& writeBuf

IdleTimeoutTransceiverDecorator::~IdleTimeoutTransceiverDecorator()
{
// If we destroy this object before calling decoratorInit(), _heartbeatTimerTask and _idleCheckTimerTask will be
// null.
if (_heartbeatTimerTask)
{
_timer->cancel(_heartbeatTimerTask);
}
// Since ConnectionI is noexcept, decoratorInit always sets _heartbeatTimerTask.
assert(_heartbeatTimerTask);
_timer->cancel(_heartbeatTimerTask);

if (_idleCheckTimerTask)
{
_timer->cancel(_idleCheckTimerTask);
Expand Down
11 changes: 3 additions & 8 deletions cpp/src/Ice/UdpTransceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,14 +472,9 @@ IceInternal::UdpTransceiver::finishRead(Buffer& buf)
bool
IceInternal::UdpTransceiver::isWaitingToBeRead() const noexcept
{
if (_incoming)
{
return hasBytesAvailable(_fd);
}
else
{
return false;
}
// isWaitingToBeRead is used only by the idle check, and the idle check is not used for UDP.
assert(false);
return false;
}

string
Expand Down

0 comments on commit c4e8206

Please sign in to comment.