As identified in #35 (comment), the implementation of port_name currently does not behave according to the documentation with regard to an error being returned when the port is no longer available:
An error will be returned when the port is no longer valid (e.g. the respective device has been disconnected).
We currently don't detect that situation, because we simply return the stored port name. An additional check needs to be added.