Get SSL context if configured.
(self)
| 258 | self.log.error("ASGI lifespan shutdown error: %s", e) |
| 259 | |
| 260 | def _get_ssl_context(self): |
| 261 | """Get SSL context if configured.""" |
| 262 | if not self.cfg.is_ssl: |
| 263 | return None |
| 264 | |
| 265 | try: |
| 266 | from gunicorn import sock |
| 267 | return sock.ssl_context(self.cfg) |
| 268 | except Exception as e: |
| 269 | self.log.error("Failed to create SSL context: %s", e) |
| 270 | return None |
| 271 | |
| 272 | def _cleanup(self): |
| 273 | """Clean up resources on exit.""" |
no test coverage detected