always close the transport when calling close()