Skip to content

Commit

Permalink
[FAB-10491] Fix go routine leak in channel client
Browse files Browse the repository at this point in the history
When requests timeout, the routines listening on
the 'complete' channel exit while the writers
block forever. Making this a buffered channel will
resolve this issue.

Change-Id: If938506be4c87b6cc2c8f677bea6e090565fc27b
Signed-off-by: Divyank Katira <[email protected]>
  • Loading branch information
d1vyank committed May 31, 2018
1 parent ced92a7 commit a6ae071
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/client/channel/chclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (cc *Client) InvokeHandler(handler invoke.Handler, request Request, options
),
)

complete := make(chan bool)
complete := make(chan bool, 1)
go func() {
_, _ = invoker.Invoke(
func() (interface{}, error) {
Expand Down

0 comments on commit a6ae071

Please sign in to comment.