Skip to content

Commit 14c756d

Browse files
authored
Merge pull request #629 from tpolecat/issue/628
don't sync after PortalSuspended
2 parents 6e573b4 + 31d9169 commit 14c756d

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

modules/core/shared/src/main/scala/net/protocol/Unroll.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private[protocol] class Unroll[F[_]: MessageSocket: Trace](
7777
flatExpect {
7878
case rd @ RowData(_) => accumulate(rd.fields :: accum)
7979
case CommandComplete(_) => sync.as((accum.reverse ~ false))
80-
case PortalSuspended => sync.as((accum.reverse ~ true))
80+
case PortalSuspended => (accum.reverse ~ true).pure[F]
8181
case ErrorResponse(info) => syncAndFail(info)
8282
}
8383

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright (c) 2018-2021 by Rob Norris
2+
// This software is licensed under the MIT License (MIT).
3+
// For more information see LICENSE or https://opensource.org/licenses/MIT
4+
5+
package tests.issue
6+
7+
import skunk._
8+
import skunk.codec.all._
9+
import skunk.implicits._
10+
import tests.SkunkTest
11+
12+
// https://github.com/tpolecat/skunk/issues/628
13+
class Test628 extends SkunkTest {
14+
15+
sessionTest("issue/628") { s =>
16+
s.prepare(sql"select name from country".query(varchar)).use { ps =>
17+
ps.stream(Void, 10).compile.toList
18+
}
19+
}
20+
21+
}

0 commit comments

Comments
 (0)