MCPcopy
hub / github.com/chaozh/MIT-6.824 / DisconnectClientUnlocked

Method DisconnectClientUnlocked

src/shardctrler/config.go:212–219  ·  view source on GitHub ↗

caller should hold cfg.mu

(ck *Clerk, from []int)

Source from the content-addressed store, hash-verified

210
211// caller should hold cfg.mu
212func (cfg *config) DisconnectClientUnlocked(ck *Clerk, from []int) {
213 // log.Printf("DisconnectClient %v from %v\n", ck, from)
214 endnames := cfg.clerks[ck]
215 for j := 0; j < len(from); j++ {
216 s := endnames[from[j]]
217 cfg.net.Enable(s, false)
218 }
219}
220
221func (cfg *config) DisconnectClient(ck *Clerk, from []int) {
222 cfg.mu.Lock()

Callers 1

DisconnectClientMethod · 0.95

Calls 1

EnableMethod · 0.80

Tested by

no test coverage detected