Skip to content

Commit

Permalink
close ch inside of goroutine
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaeljesus committed Mar 6, 2018
1 parent 0822b78 commit 1361161
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/reader/generic/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ func (s *SqlReader) ReadTable(tableName string, rowChan chan<- database.Row, opt
defer cancel()

errchan := make(chan error)
defer close(errchan)
go func() {
defer close(errchan)
rows, err = query.RunWith(s.GetConnection()).QueryContext(ctx)
errchan <- err
}()
Expand Down

0 comments on commit 1361161

Please sign in to comment.