MCPcopy
hub / github.com/shadowsocks/shadowsocks / remove_callback

Method remove_callback

shadowsocks/asyncdns.py:392–402  ·  view source on GitHub ↗
(self, callback)

Source from the content-addressed store, hash-verified

390 self._cache.sweep()
391
392 def remove_callback(self, callback):
393 hostname = self._cb_to_hostname.get(callback)
394 if hostname:
395 del self._cb_to_hostname[callback]
396 arr = self._hostname_to_cb.get(hostname, None)
397 if arr:
398 arr.remove(callback)
399 if not arr:
400 del self._hostname_to_cb[hostname]
401 if hostname in self._hostname_status:
402 del self._hostname_status[hostname]
403
404 def _send_req(self, hostname, qtype):
405 req = build_request(hostname, qtype)

Callers 1

destroyMethod · 0.80

Calls 2

getMethod · 0.80
removeMethod · 0.80

Tested by

no test coverage detected