common: avoid possible SSL_shutdown crash