code: def end(self, close_fileobj=True):
          
          log.debug("in TftpContext.end - closing socket")
          self.sock.close()
          if close_fileobj and self.fileobj is not None and not self.fileobj.closed:
              log.debug("self.fileobj is open - closing")
              self.fileobj.close()
docs: Perform session cleanup, since the end method should always be
          called explicitely by the calling code, this works better than the
          destructor.
          Set close_fileobj to False so fileobj can be returned open.