Covering the TLS file is hard and unnecessary.

These branches are difficult to test and prove nothing.
Test clean shutdown.
Define the ConnectionError.
Test abnormal shutdown.