You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Bolt/BoltConnection.php
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -201,6 +201,10 @@ public function begin(?string $database, ?float $timeout, BookmarkHolder $holder
201
201
*/
202
202
publicfunctiondiscard(?int$qid): void
203
203
{
204
+
if (!in_array($this->protocol()->serverState, [ServerState::STREAMING, ServerState::TX_STREAMING], true)) {
205
+
thrownewNeo4jException([Neo4jError::fromMessageAndCode('Neo.ClientError.Request.Invalid', 'Message \'DISCARD\' cannot be handled by a session which isn\'t in the STREAMING|TX_STREAMING state.')]);
206
+
}
207
+
204
208
$extra = $this->buildResultExtra(null, $qid);
205
209
$response = $this->protocol()
206
210
->discard($extra)
@@ -217,6 +221,10 @@ public function discard(?int $qid): void
if (!in_array($this->protocol()->serverState, [ServerState::READY, ServerState::TX_READY, ServerState::TX_STREAMING], true)) {
225
+
thrownewNeo4jException([Neo4jError::fromMessageAndCode('Neo.ClientError.Request.Invalid', 'Message \'RUN\' cannot be handled by a session which isn\'t in the READY|TX_READY|TX_STREAMING state.')]);
if (!in_array($this->protocol()->serverState, [ServerState::STREAMING, ServerState::TX_STREAMING], true)) {
286
+
thrownewNeo4jException([Neo4jError::fromMessageAndCode('Neo.ClientError.Request.Invalid', 'Message \'PULL\' cannot be handled by a session which isn\'t in the STREAMING|TX_STREAMING state.')]);
0 commit comments