Skip to content

Commit 0e3b2a1

Browse files
Log closing of completion channel (#232)
* log closing of completion channel * fix ci
1 parent c962a5c commit 0e3b2a1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ commands:
2525
- when:
2626
condition: << parameters.linux >>
2727
steps:
28-
- run: sudo apt-get update
28+
- run: sudo apt-get update --allow-releaseinfo-change
2929
- run: sudo apt-get install ocl-icd-opencl-dev
3030
build-all:
3131

transport/graphsync/graphsync.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,10 @@ func (t *Transport) consumeResponses(responseChan <-chan graphsync.ResponseProgr
179179
// Read from the graphsync response and error channels until they are closed
180180
// or there is an error, then call the channel completed callback
181181
func (t *Transport) executeGsRequest(req *gsReq) {
182-
defer req.onComplete()
182+
defer func() {
183+
log.Infow("gs request complete for channel", "chid", req.channelID)
184+
req.onComplete()
185+
}()
183186

184187
lastError := t.consumeResponses(req.responseChan, req.errChan)
185188

@@ -885,6 +888,7 @@ func (c *dtChannel) open(ctx context.Context, chid datatransfer.ChannelID, dataS
885888
// completes (or is cancelled)
886889
completed := make(chan struct{})
887890
onComplete := func() {
891+
log.Infow("closing the completion ch for data-transfer channel", "chid", chid)
888892
close(completed)
889893
}
890894
c.completed = completed

0 commit comments

Comments
 (0)