supress gevent error from sses

This commit is contained in:
Kevin Froman 2020-01-27 23:52:35 -06:00
parent a1fd5f2648
commit 2bc996f660
2 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@ SSE API for node client access
""" """
from flask import g, Blueprint from flask import g, Blueprint
from gevent import sleep from gevent import sleep
import gevent
from onionrstatistics.transports.tor import TorStats from onionrstatistics.transports.tor import TorStats
from .. import wrapper from .. import wrapper
@ -25,6 +26,7 @@ from .. import wrapper
private_sse_blueprint = Blueprint('privatesse', __name__) private_sse_blueprint = Blueprint('privatesse', __name__)
SSEWrapper = wrapper.SSEWrapper() SSEWrapper = wrapper.SSEWrapper()
gevent.hub.Hub.NOT_ERROR = (gevent.GreenletExit, SystemExit, Exception)
@private_sse_blueprint.route('/hello') @private_sse_blueprint.route('/hello')
def stream_hello(): def stream_hello():

View File

@ -12,7 +12,7 @@
"insert_deniable_blocks": true, "insert_deniable_blocks": true,
"max_block_age": 2678400, "max_block_age": 2678400,
"public_key": "", "public_key": "",
"random_bind_ip": false, "random_bind_ip": true,
"use_bootstrap_list": true, "use_bootstrap_list": true,
"store_plaintext_blocks": true, "store_plaintext_blocks": true,
"show_notifications": true "show_notifications": true