Properly terminate SSL server connections.

Before, we had dangling SSL server connections causing resource exhaustion.

I believe this fixe #144 and #153