Comments (6)
It seems like checking for @session.closed?
in this loop: https://github.com/net-ssh/net-ssh-gateway/blob/master/lib/net/ssh/gateway.rb#L196-L201 could be the start of detecting a closed connection.
If @delano or @jamis have any perspective on how they'd like to alert the gateway, I'd be happy to send a PR.
from net-ssh-gateway.
Could be as simple as adding a method on the gateway instance to check for @session.closed?
, leave it up to the user to watch for closed connections.
from net-ssh-gateway.
Can you detail the concrete usecase?
from net-ssh-gateway.
Servers A, B, and C. A => B => C, with B acting as a tunnel/gateway. If B or C close the connection from their end, there does not appear to be away to ask the ruby gateway instance if the connection is still active, to take action (like restarting a process or killing a DB connection).
from net-ssh-gateway.
Thanks. Net-ssh-gateway is in maitanance mode, and AFAIK we have no plans to extend it to support your usecase.
You should be able to subclass Gateway and get access to @session
but it's tricky business because of the locking, another option might be forking the library. Then we can discuss if/in what way we can integrate those changes.
from net-ssh-gateway.
I can send a PR @mfazekas.
from net-ssh-gateway.
Related Issues (10)
- Gateway remains active when underlying session is closed by host HOT 8
- Please cut a new gem release to include :loop_wait fix HOT 2
- ERROR: While executing gem ... (Gem::Security::Exception) HOT 2
- SSH to AWS EC2 with Key File HOT 2
- Using MAC Address
- Luiz HOT 1
- Ruby 3 support or alternative
- Gateway becomes unusable after failed communication HOT 4
- Reverse tunnel support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from net-ssh-gateway.