(sink *responseSink, exchange *pendingExchange, message string)
| 673 | } |
| 674 | |
| 675 | func (a *copilotRequestAdapter) failViaSink(sink *responseSink, exchange *pendingExchange, message string) { |
| 676 | exchange.mu.Lock() |
| 677 | finished := exchange.finished |
| 678 | started := exchange.started |
| 679 | exchange.mu.Unlock() |
| 680 | if finished { |
| 681 | return |
| 682 | } |
| 683 | if !started { |
| 684 | _ = sink.start(502, "", http.Header{}) |
| 685 | } |
| 686 | _ = sink.sinkError(message, "") |
| 687 | } |
| 688 | |
| 689 | func (a *copilotRequestAdapter) finishCancelled(sink *responseSink, exchange *pendingExchange) { |
| 690 | exchange.mu.Lock() |
no test coverage detected