Skip to content

Commit

Permalink
Merge pull request #529 from trobert/nodelay
Browse files Browse the repository at this point in the history
Set TCP_NODELAY
  • Loading branch information
tpolecat authored Aug 18, 2021
2 parents ea2efa0 + 66735b3 commit 9806622
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/core/shared/src/main/scala/net/BitVectorSocket.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import cats.effect._
import cats.syntax.all._
import fs2.Chunk
import scodec.bits.BitVector
import fs2.io.net.{ Socket, SocketGroup }
import fs2.io.net.{Socket, SocketGroup, SocketOption}
import com.comcast.ip4s._
import skunk.exception.EofException

Expand Down Expand Up @@ -67,7 +67,7 @@ object BitVectorSocket {
sslOptions: Option[SSLNegotiation.Options[F]],
)(implicit ev: MonadError[F, Throwable]): Resource[F, BitVectorSocket[F]] =
for {
sock <- sg.client(SocketAddress(Hostname.fromString(host).get, Port.fromInt(port).get)) // TODO
sock <- sg.client(SocketAddress(Hostname.fromString(host).get, Port.fromInt(port).get), List(SocketOption.noDelay(true))) // TODO
sockʹ <- sslOptions.fold(sock.pure[Resource[F, *]])(SSLNegotiation.negotiateSSL(sock, _))
} yield fromSocket(sockʹ)

Expand Down

0 comments on commit 9806622

Please sign in to comment.