Incompatibility with gunicorn ssl (and quick fix)

63 views
Skip to first unread message

Danny Goodman

unread,
Nov 28, 2014, 6:36:52 PM11/28/14
to gevent-...@googlegroups.com
It turns out that both gunicorn and socketio specify the "do_handshake_on_connect" keyword in config, so an error is thrown when using ssl:

            if self.cfg.is_ssl:      # sgunicorn.py line 57 version 0.3.6
                ssl_args = dict(
                    server_side=True,
                    do_handshake_on_connect=False,
                    **self.cfg.ssl_options
                )   ## This causes: TypeError: type object got multiple values for keyword argument 'do_handshake_on_connect'

This can be easily fixed, eg:

                ssl_args = dict(
                    server_side=True,
                    do_handshake_on_connect=False
                )
                ssl_args.update(self.cfg.ssl_options)

Thoughts?
Reply all
Reply to author
Forward
0 new messages