Skip to content

Treat 0 in addition to -1 as an infinite timeout for COPY operations #6351

@vonzshik

Description

@vonzshik

After #6122 we no longer treat 0 as infinite timeout, and instead use -1 for the same purpose. While this is in line with other .NET API (like NetworkStream.ReadTimeout), both NetworkStream and Socket support setting 0 and also treat it as infinite timeout. In addition, setting timeout to 0 currently doesn't make much sense (since it just results in us immediately cancelling the operation). Plus, in this particular case we go against SqlClient (where 0 means infinite timeout).
Which is why it's probably better to relax the change, by also supporting 0 as infinite timeout. Given that we only change COPY operations specifically, this shouldn't be too invasive.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions