Make copyErrChan buffered so goroutine can always terminate
It is possible the goroutine that is reading from copyErrChan will not read in case of error.
This commit is contained in:
@@ -1085,7 +1085,7 @@ func (pgConn *PgConn) CopyFrom(ctx context.Context, r io.Reader, sql string) (Co
|
||||
|
||||
// Send copy data
|
||||
abortCopyChan := make(chan struct{})
|
||||
copyErrChan := make(chan error)
|
||||
copyErrChan := make(chan error, 1)
|
||||
signalMessageChan := pgConn.signalMessage()
|
||||
|
||||
go func() {
|
||||
|
||||
Reference in New Issue
Block a user