Stop stops the dht node server and wait for inflight gossip requests.
()
| 228 | |
| 229 | // Stop stops the dht node server and wait for inflight gossip requests. |
| 230 | func (s *KVServer) Stop() { |
| 231 | if s.cancelCtx != nil { |
| 232 | s.cancelCtx() |
| 233 | } |
| 234 | s.wg.Wait() |
| 235 | } |
| 236 | |
| 237 | func (s *KVServer) nonBlockingSync(node *proto.Node, origin proto.NodeID, ttl uint32) { |
| 238 | if s.peers == nil { |