<p>It the code I see that the module attempts to reconnect only on errors CR_SERVER_GONE_ERROR and  CR_SERVER_LOST.</p>

<p>It appears that in this case the error code is CR_SSL_CONNECTION_ERROR.</p>

<p>We can add this code to the condition to attempt to re-connect, but I wonder if other codes should be added, the list is at:</p>

<ul>
<li><a href="https://dev.mysql.com/doc/refman/5.5/en/error-messages-client.html#error_cr_ssl_connection_error">https://dev.mysql.com/doc/refman/5.5/en/error-messages-client.html#error_cr_ssl_connection_error</a></li>
</ul>

<p>If you want to try yourself, see modules/db_mysql/km_dbase.c, line 116.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/406#issuecomment-158985365">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36Ze9cYpGbkj5CR608PJy4p0my6cEHks5pIzSJgaJpZM4Gmb_R.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/406#issuecomment-158985365"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>