fix(tls): on socket error, call callback