WIP: Fixed dtls negotiation failures by adding explicit shutdown code.