-
-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Description
In my opinion, the following code does not make sense because it cancels promises without putting the backend back into the idle state, which leaves the backend and frontend state out of sync. In practice this doesn’t matter since we can’t cancel a query before having a row stream so this code should never be called.
postgres-nio/Sources/PostgresNIO/New/Connection State Machine/ExtendedQueryStateMachine.swift
Lines 106 to 112 in c17db2f
self.isCancelled = true | |
switch queryContext.query { | |
case .unnamed(_, let eventLoopPromise), .executeStatement(_, let eventLoopPromise): | |
return .failQuery(eventLoopPromise, with: .queryCancelled) | |
case .prepareStatement(_, _, _, let eventLoopPromise): | |
return .failPreparedStatementCreation(eventLoopPromise, with: .queryCancelled) |
Metadata
Metadata
Assignees
Labels
No labels