=act #16653 swallow exception from setTcpNoDelay
* some versions of netcat (`nc -z`) doesn't allow setTcpNoDelay (cherry picked from commit c4ca93eec652c31f48b7203999dc8b27c3ebc70a) Conflicts: akka-actor/src/main/scala/akka/io/TcpConnection.scala
This commit is contained in:
parent
73e315f8df
commit
83d75528ee
1 changed files with 6 additions and 1 deletions
|
|
@ -181,7 +181,12 @@ private[io] abstract class TcpConnection(val tcp: TcpExt, val channel: SocketCha
|
|||
def completeConnect(registration: ChannelRegistration, commander: ActorRef,
|
||||
options: immutable.Traversable[SocketOption]): Unit = {
|
||||
// Turn off Nagle's algorithm by default
|
||||
channel.socket.setTcpNoDelay(true)
|
||||
try channel.socket.setTcpNoDelay(true) catch {
|
||||
case e: SocketException ⇒
|
||||
// as reported in #16653 some versions of netcat (`nc -z`) doesn't allow setTcpNoDelay
|
||||
// continue anyway
|
||||
log.debug("Could not enable TcpNoDelay: {}", e.getMessage)
|
||||
}
|
||||
options.foreach(_.afterConnect(channel))
|
||||
|
||||
commander ! Connected(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue