Replace existing connection (if there is one) and close it.
(self, conn)
| 3602 | self._cluster.metadata.dbaas = self._connection._product_type == dscloud.DATASTAX_CLOUD_PRODUCT_TYPE |
| 3603 | |
| 3604 | def _set_new_connection(self, conn): |
| 3605 | """ |
| 3606 | Replace existing connection (if there is one) and close it. |
| 3607 | """ |
| 3608 | with self._lock: |
| 3609 | old = self._connection |
| 3610 | self._connection = conn |
| 3611 | |
| 3612 | if old: |
| 3613 | log.debug("[control connection] Closing old connection %r, replacing with %r", old, conn) |
| 3614 | old.close() |
| 3615 | |
| 3616 | def _reconnect_internal(self): |
| 3617 | """ |
no test coverage detected