Closes the device.
501129
def close(self):
        
        try:
            # TODO: Find a way to speed up this shutdown.
            if self.ssl:
                self._device.shutdown()

            else:
                # Make sure that it closes immediately.
                self._device.shutdown(socket.SHUT_RDWR)

        except Exception:
            pass

        Device.close(self)
398180
public void close() {
		if (thread == null) {
			closed = true;
		}

		running = false;

		if (thread != null) {
			thread.interrupt();
		}
	}
162784
public void close() {
        try {
            synchronized (lock) {
                if (out == null)
                    return;
                out.close();
                out = null;
            }
        }
        catch (IOException x) {
            trouble = true;
        }
    }
1054308
def close(self):
        
        self._closing = True
        for i in xrange(self.size):
            self.inq.put(_STOP)
1145282
public void close()
    {
        inputManager.unregisterInputDeviceListener(inputDeviceListener);
        mouseDeviceManager.forceStopThread();
        gamepadDeviceManager.forceStopThread();
        controllerIds.clear();
        cache.clear();
        controllers.clear();
    }
144825
def _close(self):
        
        self._usb_handle.releaseInterface()
        try:
            # If we're using PyUSB >= 1.0 we can re-attach the kernel driver here.
            self._usb_handle.dev.attach_kernel_driver(0)
        except:
            pass
        self._usb_int = None
        self._usb_handle = None
        return True
1356452
def close(self):
        
        self._check_device_status()
        hidapi.hid_close(self._device)
        self._device = None
605992
def close(self):
        
        if hasattr(self, '_FITS'):
            if self._FITS is not None:
                self._FITS.close()
                self._FITS = None
        self._filename = None
        self.mode = None
        self.charmode = None
        self.intmode = None
        self.hdu_list = None
        self.hdu_map = None
63767
public void close()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    	SibTr.entry(tc, "close");
    btmLockManager.lockExclusive();
    try
    {
      stopTimer();
      activeEntries = null;
    }
    finally
    {
      btmLockManager.unlockExclusive();
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    	SibTr.exit(tc, "close");
  }
1268880
def stop(self):
        """"""
        self.logger.warning("Stop executed")
        try:
            self._reader.close()
        except serial.serialutil.SerialException:
            self.logger.error("Error while closing device")
            raise VelbusException("Error while closing device")
        time.sleep(1)
506013
public void close() {
        if (connected) {
            try {
                terminal.deactivate();
            }
            catch (Exception ex) {
                logger.debug("Exception occurred while closing UDPMasterConnection", ex);
            }
            connected = false;
        }
    }
1309136
public void close() {
		if (this.sock != null)
			try {
				this.sock_in.close();
				this.sock_out.close();
				this.sock.close();
				this.sock=null;
				this.sock_in=null;
				this.sock_out=null;
			} catch (IOException e) {
			}
	}
967053
def close(self):
        
        try:
            Device.close(self)

            # HACK: Probably should fork pyftdi and make this call in .close()
            self._device.usb_dev.attach_kernel_driver(self._device_number)

        except Exception:
            pass
1017693
def _Close(self):
    
    self._bde_volume.close()
    self._bde_volume = None

    self._file_object.close()
    self._file_object = None
248761
def close(self):
        """"""
        if self.streamSock:
            self.watch(enable=False)
            self.streamSock.close()
        self.streamSock = None
1291437
def close(self):
        
        assert self.closed is False

        log.debug("closing interface")
        self.closed = True
        self.read_sem.release()
        self.thread.join()
        assert self.rcv_data[-1] is None
        self.rcv_data = []
        usb.util.release_interface(self.dev, self.intf_number)
        if self.kernel_driver_was_attached:
            try:
                self.dev.attach_kernel_driver(self.intf_number)
            except Exception as exception:
                log.warning('Exception attaching kernel driver: %s',
                                str(exception))
        usb.util.dispose_resources(self.dev)
        self.ep_out = None
        self.ep_in = None
        self.dev = None
        self.intf_number = None
        self.kernel_driver_was_attached = False
        self.thread = None
213084
def close(self):
        
        try:
            self.connection.close()
            self.connection = None
        except Exception:
            if not self.fail_silently:
                raise