update ESServerExtensionForWait

Close the connection and streams in finally block