Skip to content

Commit

Permalink
Fix IceGrid Glacier2 session managers to keep sessions alive (#2756)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone authored Sep 30, 2024
1 parent 5efb9f4 commit c2e07e9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cpp/src/IceGrid/AdminSessionI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ AdminSessionI::~AdminSessionI()
{
}

void
AdminSessionI::ice_ping(const Ice::Current& current) const
{
const_cast<AdminSessionI*>(this)->keepAlive(current);
}

Ice::ObjectPrx
AdminSessionI::_register(const SessionServantManagerPtr& servantManager, const Ice::ConnectionPtr& con)
{
Expand Down
2 changes: 2 additions & 0 deletions cpp/src/IceGrid/AdminSessionI.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class AdminSessionI : public BaseSessionI, public AdminSession

Ice::ObjectPrx _register(const SessionServantManagerPtr&, const Ice::ConnectionPtr&);

virtual void ice_ping(const Ice::Current&) const;

virtual void keepAlive(const Ice::Current& current) { BaseSessionI::keepAlive(current); }

virtual AdminPrx getAdmin(const Ice::Current&) const;
Expand Down
6 changes: 6 additions & 0 deletions cpp/src/IceGrid/SessionI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ SessionI::~SessionI()
{
}

void
SessionI::ice_ping(const Ice::Current& current) const
{
const_cast<SessionI*>(this)->keepAlive(current);
}

Ice::ObjectPrx
SessionI::_register(const SessionServantManagerPtr& servantManager, const Ice::ConnectionPtr& con)
{
Expand Down
2 changes: 2 additions & 0 deletions cpp/src/IceGrid/SessionI.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ class SessionI : public BaseSessionI, public Session

Ice::ObjectPrx _register(const SessionServantManagerPtr&, const Ice::ConnectionPtr&);

virtual void ice_ping(const Ice::Current&) const;

virtual void keepAlive(const Ice::Current& current) { BaseSessionI::keepAlive(current); }

virtual void allocateObjectById_async(const AMD_Session_allocateObjectByIdPtr&, const Ice::Identity&,
Expand Down

0 comments on commit c2e07e9

Please sign in to comment.