Connects/disconnects slots to/from signals when the mode state
        changed.
960039
def on_state_changed(self, state):
        
        super(GoToDefinitionMode, self).on_state_changed(state)
        if state:
            self.editor.mouse_moved.connect(self._on_mouse_moved)
            self.editor.mouse_released.connect(self._on_mouse_released)
            self.editor.add_action(self.action_goto, sub_menu='COBOL')
            self.editor.mouse_double_clicked.connect(
                self._timer.cancel_requests)
        else:
            self.editor.mouse_moved.disconnect(self._on_mouse_moved)
            self.editor.mouse_released.disconnect(self._on_mouse_released)
            self.editor.remove_action(self.action_goto, sub_menu='Python')
            self.editor.mouse_double_clicked.disconnect(
                self._timer.cancel_requests)
1170643
protected void disconnect() {

		// Stop broadcaster
		if (locator != null) {
			locator.disconnect();
			locator = null;
		}

		// Stop gossiper's timer
		if (gossiperTimer != null) {
			gossiperTimer.cancel(false);
			gossiperTimer = null;
		}

		// Close socket reader
		if (reader != null) {
			reader.disconnect();
			reader = null;
		}

		// Close socket writer
		if (writer != null) {
			writer.disconnect();
			writer = null;
		}
	}
348315
def state_machine_selection_changed(self, state_machine_m, signal_name, signal_msg):
        """"""
        if self.CORE_ELEMENT_CLASS in signal_msg.arg.affected_core_element_classes:
            self.update_selection_sm_prior()
308612
public void disconnect() {
		if(!isConnected){
			if(this.isReconnecting){
				stopReconnecting();
				this.isConnecting = false;
			} else {
				raiseOrtcEvent(EventEnum.OnException,this, new OrtcNotConnectedException());
			}
		}else{
			stopHeartBeatInterval();
			this.disconnectIntern();
		}
	}
956610
def disconnect(self):
        """"""
        if self._connected:
            self._connected = False
            self._conn.disconnect()
866905
def register_signals(self):
        """"""
        for index in self.indexes:
            if index.object_type:
                self._connect_signal(index)
224477
def _disconnect_signals(self, model):
        
        for signal, receiver in self._signals.items():
            signal.disconnect(sender=model, dispatch_uid=self._dispatch_uid(signal, model))
884831
def switch(self, device_id, obj_slot_id):
        """"""
        payload = {
            "device-context": self._build_payload(device_id, obj_slot_id)
        }

        return self._post(self.url_prefix, payload)
275157
def connectionLost(self, reason):
        
        AMP.connectionLost(self, reason)
        if self.logout is not None:
            self.logout()
            self.boxReceiver = self.logout = None
1029689
def _on_disconnect(_loop, adapter, _adapter_id, conn_id):
    """"""

    conn_string = adapter._get_property(conn_id, 'connection_string')
    if conn_string is None:
        adapter._logger.debug("Dropping disconnect notification with unknown conn_id=%s", conn_id)
        return

    adapter._teardown_connection(conn_id, force=True)
    event = dict(reason='no reason passed from legacy adapter', expected=False)
    adapter.notify_event_nowait(conn_string, 'disconnection', event)
83961
function configureConnection(connection) {
        // Set the common hub
        abp.signalr.hubs.common = connection;

        // Reconnect if hub disconnects
        connection.onclose(function (e) {
            if (e) {
                abp.log.debug('Connection closed with error: ' + e);
            }
            else {
                abp.log.debug('Disconnected');
            }

            if (!abp.signalr.autoConnect) {
                return;
            }

            setTimeout(function () {
                connection.start();
            }, 5000);
        });

        // Register to get notifications
        connection.on('getNotification', function (notification) {
            abp.event.trigger('abp.notifications.received', notification);
        });
    }
485844
def watchSignal(self, signal):
        
        self._extend_state()

        def signal_handler(*args, **kwargs):
            self._events_seen.append((signal, args, kwargs))
        signal.connect(signal_handler)
        if hasattr(self, 'addCleanup'):
            self.addCleanup(signal.disconnect, signal_handler)
626616
def connect(obj, signal, slot, event_type=tango.EventType.CHANGE_EVENT):
    """"""
    return obj._helper.connect(signal, slot, event_type=event_type)
1371522
public synchronized void disconnect() {
    if (mConnected) {
      Preconditions.checkNotNull(mChannel, PreconditionMessage.CHANNEL_NULL_WHEN_CONNECTED);
      LOG.debug("Disconnecting from the {} @ {}", getServiceName(), mAddress);
      beforeDisconnect();
      mChannel.shutdown();
      mConnected = false;
      afterDisconnect();
    }
  }
776770
def connect(self, signal, slot):
        
        super(XViewDispatch, self).connect(self, SIGNAL(signal), slot)
1277045
public void disconnect(Destination d) throws KNXLinkClosedException
	{
		if (detached)
			throw new KNXIllegalStateException("TL detached");
		if (d.getState() != Destination.DESTROYED
			&& d.getState() != Destination.DISCONNECTED)
			disconnectIndicate(getProxy(d), true);
	}
1247367
def session_callback(self, signal):
        
        if signal == SIGNAL_DATA:
            self.event.new_event(self.data)

        elif signal == SIGNAL_FAILED:
            self.retry()

        if signal in [SIGNAL_PLAYING, SIGNAL_FAILED] and \
                self.connection_status_callback:
            self.connection_status_callback(signal)