Skip to content

Commit

Permalink
Server: gevent: mute SSL errors
Browse files Browse the repository at this point in the history
  • Loading branch information
LifeDJIK committed Feb 21, 2024
1 parent 582c534 commit ebfd434
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pylon/core/tools/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,14 @@ def run_server(context):
""" Run WSGI or Flask server """
if not context.debug and context.web_runtime == "gevent":
log.info("Starting gevent WSGI server")
#
import ssl # pylint: disable=C0415
import gevent.hub # pylint: disable=E0401,C0412,C0415
#
hub_not_errors = list(gevent.hub.Hub.NOT_ERROR)
hub_not_errors.append(ssl.SSLError)
gevent.hub.Hub.NOT_ERROR = tuple(hub_not_errors)
#
from gevent.pywsgi import WSGIServer # pylint: disable=E0401,C0412,C0415
from geventwebsocket.handler import WebSocketHandler # pylint: disable=E0401,C0412,C0415
http_server = WSGIServer(
Expand Down

0 comments on commit ebfd434

Please sign in to comment.