Skip to content

Commit

Permalink
Merge pull request #1098 from keynmol/use-host-instead-of-hostname
Browse files Browse the repository at this point in the history
Use Host instead of Hostname
  • Loading branch information
mpilquist authored Jun 5, 2024
2 parents e66ae4f + a2c4f74 commit 38264e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/core/shared/src/main/scala/Session.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import cats.data.Kleisli
import cats.effect._
import cats.effect.std.Console
import cats.syntax.all._
import com.comcast.ip4s.{Hostname, Port, SocketAddress}
import com.comcast.ip4s.{Host, Port, SocketAddress}
import fs2.concurrent.Signal
import fs2.io.net.{ Network, Socket, SocketGroup, SocketOption }
import fs2.Pipe
Expand Down Expand Up @@ -572,7 +572,7 @@ object Session {
Resource.eval(ev.raiseError(new SkunkException(message = msg, sql = None)))

def sock: Resource[F, Socket[F]] = {
(Hostname.fromString(host), Port.fromInt(port)) match {
(Host.fromString(host), Port.fromInt(port)) match {
case (Some(validHost), Some(validPort)) => socketGroup.client(SocketAddress(validHost, validPort), socketOptions)
case (None, _) => fail(s"""Hostname: "$host" is not syntactically valid.""")
case (_, None) => fail(s"Port: $port falls out of the allowed range.")
Expand Down

0 comments on commit 38264e6

Please sign in to comment.