added close function in order to close the transport gracefully