Comments (5)
Here is the functional patch, without the command line switch:
diff --git a/websocket.py b/websocket.py
index 11f718c..1bb83c0 100644
--- a/websocket.py
+++ b/websocket.py
@@ -837,9 +837,14 @@ Sec-WebSocket-Accept: %s\r
self.client = None
startsock = None
pid = err = 0
+ child_count = 0
+
+ if multiprocessing and self.timeout:
+ child_count = len(multiprocessing.active_children())
time_elapsed = time.time() - self.launch_time
- if self.timeout and time_elapsed > self.timeout:
+ if self.timeout and time_elapsed > self.timeout
+ and child_count == 0:
self.msg('listener exit due to --timeout %s'
% self.timeout)
break
from websockify.
Yes, that's a reasonable change. I think it should be a separate option from the normal --timeout. Something like --idle-timeout. --timeout would be how long to listen for new connections, and --idle-timeout would be how long to stick around when there are no active connections.
Also, it would be easiest if you fork, make the changes and issue a pull request. Thanks.
from websockify.
Thanks still new to GitHub and how things work here. I will try to get a pull request issued.
from websockify.
Thanks for the help I have issued the pull request and hope I have done it properly. Thank you very much for your patience.
from websockify.
@AricStewart, sorry for the delay. Day job and all that. The change looks good. Thanks for the contribution.
from websockify.
Related Issues (20)
- systemd script to startup
- about target-config HOT 1
- tests failed on macos
- Logging and monitor HOT 1
- How to Revoking a Certificate of VNCServer? HOT 1
- TypeError: 'str' object cannot be interpreted as an integer
- noVNC & websockify in Docker Compose on Raspberry Pi 4 using RealVNC Server HOT 1
- Installation fails HOT 1
- wss: via ssl on linux debian board HOT 1
- Readme is missing examples HOT 1
- Failed when connecting: Connection closed (code: 1005) HOT 2
- soft reload possibility HOT 1
- novnc session getting disconnected after 30 min if left idle HOT 5
- Server disconnected (code: 1015). Open developer tools (F12/Ctrl+Shift+I on Windows, Option+Command+I on Mac OS) and switch to "Console" for details HOT 1
- Exception when use JSONTokenApi as token plugin
- how to connect to tls vnc server HOT 4
- Extra parameters HOT 2
- Connection pooling HOT 1
- which option disabling directory listings HOT 1
- How to integrate noVNC in Angular 16
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 websockify.