Skip to content

Commit 3878dca

Browse files
authored
Merge pull request #3060 from typelevel/update/epollcat-0.1.2
Update epollcat to 0.1.2
2 parents 53ae516 + 8bfbfcb commit 3878dca

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ lazy val io = crossProject(JVMPlatform, JSPlatform, NativePlatform)
258258
.nativeSettings(commonNativeSettings)
259259
.nativeSettings(
260260
libraryDependencies ++= Seq(
261-
"com.armanbilge" %%% "epollcat" % "0.1.1" % Test
261+
"com.armanbilge" %%% "epollcat" % "0.1.2" % Test
262262
),
263263
Test / nativeBrewFormulas += "s2n",
264264
Test / envVars ++= Map("S2N_DONT_MLOCK" -> "1")

io/shared/src/test/scala/fs2/io/net/tcp/SocketSuite.scala

+3-5
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import com.comcast.ip4s._
3131
import scala.concurrent.duration._
3232
import scala.concurrent.TimeoutException
3333

34+
// Note: OS X doesn't currently work with IPv6 so server resources must explicitly bind v4 addresses
3435
class SocketSuite extends Fs2IoSuite with SocketSuitePlatform {
3536

3637
val timeout = 30.seconds
@@ -177,10 +178,7 @@ class SocketSuite extends Fs2IoSuite with SocketSuitePlatform {
177178
}
178179
} yield ()).use_ >> (for {
179180
_ <- Network[IO].client(SocketAddress.fromString("not.example.com:80").get).use_.recover {
180-
case ex: UnknownHostException =>
181-
assert(
182-
ex.getMessage == "not.example.com: Name or service not known" || ex.getMessage == "not.example.com: nodename nor servname provided, or not known"
183-
)
181+
case _: UnknownHostException => ()
184182
}
185183
} yield ())
186184
}
@@ -255,7 +253,7 @@ class SocketSuite extends Fs2IoSuite with SocketSuitePlatform {
255253
}
256254

257255
test("can shutdown a socket that's pending a read") {
258-
Network[IO].serverResource().use { case (bindAddress, clients) =>
256+
Network[IO].serverResource(Some(ip"127.0.0.1")).use { case (bindAddress, clients) =>
259257
Network[IO].client(bindAddress).use { _ =>
260258
clients.head.flatMap(_.reads).compile.drain.timeout(2.seconds).recover {
261259
case _: TimeoutException => ()

site/getstarted/example.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ object Converter extends IOApp.Simple {
1313
def fahrenheitToCelsius(f: Double): Double =
1414
(f - 32.0) * (5.0/9.0)
1515

16-
Files[IO].readAll(Path("testdata/fahrenheit.txt"))
17-
.through(text.utf8.decode)
18-
.through(text.lines)
16+
Files[IO].readUtf8Lines(Path("testdata/fahrenheit.txt"))
1917
.filter(s => !s.trim.isEmpty && !s.startsWith("//"))
2018
.map(line => fahrenheitToCelsius(line.toDouble).toString)
2119
.intersperse("\n")

0 commit comments

Comments
 (0)