def link_destroyed(self, link):
self._links.discard(link)<EOL>if not self._links:<EOL><INDENT>LOG.debug("<STR_LIT>")<EOL>self._pn_session.close()<EOL>self._pn_session.free()<EOL>self._pn_session = None<EOL>self._connection = None<EOL><DEDENT>
Link has been destroyed.