MCPcopy
hub / github.com/syncthing/syncthing / handleResponse

Method handleResponse

lib/protocol/protocol.go:693–701  ·  view source on GitHub ↗
(resp *Response)

Source from the content-addressed store, hash-verified

691}
692
693func (c *rawConnection) handleResponse(resp *Response) {
694 c.awaitingMut.Lock()
695 if rc := c.awaiting[resp.ID]; rc != nil {
696 delete(c.awaiting, resp.ID)
697 rc <- asyncResult{resp.Data, codeToError(resp.Code)}
698 close(rc)
699 }
700 c.awaitingMut.Unlock()
701}
702
703func (c *rawConnection) send(ctx context.Context, msg proto.Message, done chan struct{}) bool {
704 select {

Callers 1

dispatcherLoopMethod · 0.95

Calls 2

codeToErrorFunction · 0.85
UnlockMethod · 0.80

Tested by

no test coverage detected