Send close_notify TLS alert on connection shutdown#5995
Conversation
| try | ||
| { | ||
| // Send close_notify TLS alert to correctly close connection on postgres's side | ||
| sslStream.ShutdownAsync().GetAwaiter().GetResult(); |
There was a problem hiding this comment.
I wonder if the comment above ("This method doesn't actually perform any meaningful I/O, and therefore is sync-only.") is still completely accurate, and whether at some point we should consider having a CleanupAsync...
There was a problem hiding this comment.
Yeah, certainly. But given that close_notify is just a 60 byte packet, we can probably still consider it as not being meaningful (at least for now).
There was a problem hiding this comment.
Yeah, agree it's unlikely to be an actual problem anywhere... But maybe we should do a proper async variant at some point.
There was a problem hiding this comment.
Updated the documentation for the method and opened #6012 to track changing the method to be completely async.
Fixes #5994