vapor / postgres-nio

🐘 Non-blocking, event-driven Swift client for PostgreSQL.
https://api.vapor.codes/postgresnio/documentation/postgresnio/
MIT License
305 stars 70 forks source link

`serverClosedConnection` error can never occur #396

Closed gwynne closed 11 months ago

gwynne commented 11 months ago

In ConnectionStateMachine, the .closed(clientInitiated:error:) state indicates whether the client or server closed the connection via the clientInitiatedFlag. However, at no time in the current code is clientInitiated ever set to false, and as this is the only way for a .serverClosedConnection error to be generated, it never will be.