Skip to content

Commit

Permalink
Merge pull request #629 from tpolecat/issue/628
Browse files Browse the repository at this point in the history
don't sync after PortalSuspended
  • Loading branch information
tpolecat authored Feb 23, 2022
2 parents 6e573b4 + 31d9169 commit 14c756d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private[protocol] class Unroll[F[_]: MessageSocket: Trace](
flatExpect {
case rd @ RowData(_) => accumulate(rd.fields :: accum)
case CommandComplete(_) => sync.as((accum.reverse ~ false))
case PortalSuspended => sync.as((accum.reverse ~ true))
case PortalSuspended => (accum.reverse ~ true).pure[F]
case ErrorResponse(info) => syncAndFail(info)
}

Expand Down
21 changes: 21 additions & 0 deletions modules/tests/shared/src/test/scala/issue/628.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) 2018-2021 by Rob Norris
// This software is licensed under the MIT License (MIT).
// For more information see LICENSE or https://opensource.org/licenses/MIT

package tests.issue

import skunk._
import skunk.codec.all._
import skunk.implicits._
import tests.SkunkTest

// https://github.com/tpolecat/skunk/issues/628
class Test628 extends SkunkTest {

sessionTest("issue/628") { s =>
s.prepare(sql"select name from country".query(varchar)).use { ps =>
ps.stream(Void, 10).compile.toList
}
}

}

0 comments on commit 14c756d

Please sign in to comment.