Added some gating to the endpoint closure to try to delay some NPE I'm seeing caused be a race condition somewhere when client and server in the same VM and shutting down at the same time.
Added some gating to the endpoint closure to try to delay some NPE I'm seeing caused be a race condition somewhere when client and server in the same VM and shutting down at the same time.