https://api.slack.com/methods/im.close
168410
def close(self, channel):
        
        self.params.update({
            'channel': channel,
            })
        return FromUrl('https://slack.com/api/im.close', self._requests)(data=self.params).post()
951082
private void closeCallback(AddOnModel addOnModel, IzouSoundLine izouSoundLine) {
        debug("removing soundline " + izouSoundLine + " from " + addOnModel);
        Predicate<WeakReference<IzouSoundLineBaseClass>> removeFromList =
                weakReference -> weakReference.get() != null && weakReference.get().equals(izouSoundLine);
        synchronized (permanentUserReadWriteLock) {
            if (permanentAddOn != null && permanentAddOn.equals(addOnModel) && permanentLines != null) {
                permanentLines.removeIf(removeFromList);
                if (permanentLines.isEmpty()) {
                    permanentLines = null;
                    permissionWithoutUsage();
                }
            }
        }
        List<WeakReference<IzouSoundLineBaseClass>> weakReferences = nonPermanent.get(addOnModel);
        if (weakReferences != null) {
            weakReferences.removeIf(removeFromList);
            synchronized (mutingLock) {
                if (mutingManager != null && mutingManager.getMuting().equals(addOnModel)) {
                    mutingManager = mutingManager.remove(izouSoundLine);
                }
            }
        }
        submit(this::tidy);
    }
512972
async def _remote_close(self, exc=None):
        """"""
        if self.state in (STATE_CLOSING, STATE_CLOSED):
            return

        log.info("close session: %s", self.id)
        self.state = STATE_CLOSING
        if exc is not None:
            self.exception = exc
            self.interrupted = True
        try:
            await self.handler(SockjsMessage(MSG_CLOSE, exc), self)
        except Exception:
            log.exception("Exception in close handler.")
403343
function(app) {

  try {
    // make sure we close down within N seconds
    const killtimer = setTimeout(() => {
      process.exit(1);
    }, 3000);
    // But don't keep the process open just for that!
    killtimer.unref();

    // stop taking new requests.
    app.server.close();

  } catch (err) {
    // oh well, not much we can do at this point.
    console.error('Error shutting down gracefully!', err.stack);
  }
}
618038
function _closeOnSignal(signal) {
    process.on(signal, onSignal);

    /**
     * @returns {void}
     */
    function onSignal() {
      logger.info({ workerName: configuration.workerName, signal },
        '[worker#listen] Received exit signal, stopping workers...');
      workers.close(true);
    }
  }
581683
def _recv_close(self, method_frame):
        '''
        
        '''
        self.channel._close_info = {
            'reply_code': method_frame.args.read_short(),
            'reply_text': method_frame.args.read_shortstr(),
            'class_id': method_frame.args.read_short(),
            'method_id': method_frame.args.read_short()
        }

        self.channel._closed = True
        self.channel._closed_cb(
            final_frame=MethodFrame(self.channel_id, 20, 41))
653951
def im_close(self, room_id, **kwargs):
        """"""
        return self.__call_api_post('im.close', roomId=room_id, kwargs=kwargs)
475850
function SlackWebOut(n) {
    RED.nodes.createNode(this, n);

    var node = this;
    this.client = n.client;
    this.clientNode = RED.nodes.getNode(this.client);

    node.status(statuses.disconnected);

    if (node.client) {
      SetConfigNodeConnectionListeners(node);

      node.on("input", function(msg) {
        SlackDebug("slack-web-out incomiming message", msg);

        var method = msg.topic;
        var options = msg.payload;

        if (
          !method ||
          typeof method !== "string" ||
          !method instanceof String
        ) {
          node.error("invalid msg.topic");
          return null;
        }

        /**
         * Try to help with common use case, set channel based on lookup if starts with @ or #
         *
         * https://api.slack.com/methods/chat.postMessage
         */
        if (
          method == "chat.postMessage" ||
          method == "chat.postEphemeral" ||
          method == "chat.meMessage"
        ) {
          if (options.channel[0] == "@" || options.channel[0] == "#") {
            var channel = node.clientNode.findChannelByName(options.channel);
            if (channel && channel.id) {
              options.channel = channel.id;
            }
          }
        }

        /**
         * special handling for simple use-case
         */
        if (method[0] == "@" || method[0] == "#") {
          var channel = node.clientNode.findChannelByName(method);
          if (!channel || !channel.id) {
            node.error("invalid channel: " + method);
            return null;
          }
          method = "chat.postMessage";
          options = {
            channel: channel.id,
            text: msg.payload
            //as_user: true
          };
        }

        /**
         * custom per-method logic
         */
        switch (method) {
          case "chat.postMessage":
          case "chat.postEphemeral":
          case "chat.meMessage":
            // force text to be a string
            options.text = ValueToString(options.text);
            break;
        }

        node.status(statuses.sending);
        msg.slackState = node.clientNode.state;

        SlackDebug("slack-web-out call", method, options);
        node.clientNode.webClient
          .apiCall(method, options)
          .then(res => {
            SlackDebug("slack-web-out call response", res);
            msg.payload = node.clientNode.dressResponseMessage(res);
            node.send(msg);
            node.status(statuses.connected);
          })
          .catch(e => {
            SlackDebug("slack-web-out error response", e.data);
            msg.payload = e.data;
            node.send(msg);
            node.status(statuses.connected);
          });
      });
    } else {
      node.status(statuses.misconfigured);
    }
  }
1201840
def close(self):
        
        if self.ipmi_session:
            self.ipmi_session.unregister_keepalive(self.keepaliveid)
        if self.activated:
            try:
                self.ipmi_session.raw_command(netfn=6, command=0x49,
                                              data=(1, 1, 0, 0, 0, 0))
            except exc.IpmiException:
                # if underlying ipmi session is not working, then
                # run with the implicit success
                pass
247849
def send_slack_message(channel, text):
    """"""
    http = httplib2.Http()
    return http.request(SLACK_MESSAGE_URL, 'POST', body=json.dumps({
        'channel': channel,
        'text': text,
    }))
993555
void closeImpl()
  {
    ReadStreamOld is = _is;
    _is = null;

    WriteStreamOld os = _os;
    _os = null;

    try {
      if (is != null)
        is.close();
    } catch (Throwable e) {
      log.log(Level.FINER, e.toString(), e);
    }

    try {
      if (os != null)
        os.close();
    } catch (Throwable e) {
      log.log(Level.FINER, e.toString(), e);
    }

    if (is != null) {
      _connProbe.end();

      if (_requestStartTime > 0)
        _requestTimeProbe.end(_requestStartTime);

      if (_isIdle)
        _idleProbe.end();
    }
  }
240382
def close(self):
        
        self._mmw.fake_headers(self._num_docs+1, self._num_terms, self._num_nnz)
        self._mmw.close()
1042781
def close(self):
        
        if self._closed:
            raise err.Error("Already closed")
        self._closed = True
        if self._sock is None:
            return
        send_data = struct.pack('<iB', 1, COMMAND.COM_QUIT)
        try:
            self._write_bytes(send_data)
        except Exception:
            pass
        finally:
            self._force_close()
123871
def close(self):
        """"""
        self._input.close()
        self._call_parse()
        root = self._pop_message()
        assert not self._msgstack
        # Look for final set of defects
        if root.get_content_maintype() == 'multipart' \
               and not root.is_multipart():
            defect = errors.MultipartInvariantViolationDefect()
            self.policy.handle_defect(root, defect)
        return root
297118
def _close_app(app, mongo_client, client):
    
    app.stop()
    client.close()
    mongo_client.close()
67662
function close() {
            var all = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0];

            return Channel.close(this, all);
        }
237293
def close(self, idempotency_key=None):
        """"""
        url = self.instance_url() + '/close'
        headers = populate_headers(idempotency_key)
        d = self.request('post', url, {}, headers)
        return d.addCallback(self.refresh_from).addCallback(lambda _: self)