From 3b06c062fe63fa3d3681a77054b96593d29b1f44 Mon Sep 17 00:00:00 2001 From: Jason Longshore Date: Fri, 29 Jun 2018 13:35:40 -0500 Subject: [PATCH 1/2] Unix Domain Socket - upgrade jnr-unixsocket to 0.19 --- project/Dependencies.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 79862e9cdd..1669abe775 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -312,7 +312,7 @@ object Dependencies { val UnixDomainSocket = Seq( libraryDependencies ++= Seq( - "com.github.jnr" % "jnr-unixsocket" % "0.18" // BSD/ApacheV2/CPL/MIT as per https://github.com/akka/alpakka/issues/620#issuecomment-348727265 + "com.github.jnr" % "jnr-unixsocket" % "0.19" // BSD/ApacheV2/CPL/MIT as per https://github.com/akka/alpakka/issues/620#issuecomment-348727265 ) ) From 6977572c8ec37f3ddbcc3544a3defb5fc5ce529e Mon Sep 17 00:00:00 2001 From: Jason Longshore Date: Mon, 2 Jul 2018 10:45:50 -0500 Subject: [PATCH 2/2] Unix Domain Socket - Always deregister interest in OP_READ after calling channel.read --- .../alpakka/unixdomainsocket/scaladsl/UnixDomainSocket.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unix-domain-socket/src/main/scala/akka/stream/alpakka/unixdomainsocket/scaladsl/UnixDomainSocket.scala b/unix-domain-socket/src/main/scala/akka/stream/alpakka/unixdomainsocket/scaladsl/UnixDomainSocket.scala index 27f5b9676f..3016c1bdcd 100644 --- a/unix-domain-socket/src/main/scala/akka/stream/alpakka/unixdomainsocket/scaladsl/UnixDomainSocket.scala +++ b/unix-domain-socket/src/main/scala/akka/stream/alpakka/unixdomainsocket/scaladsl/UnixDomainSocket.scala @@ -168,10 +168,12 @@ object UnixDomainSocket extends ExtensionId[UnixDomainSocket] with ExtensionIdPr val pendingResult = queue.offer(ByteString(buffer)) pendingResult.onComplete(_ => sel.wakeup()) sendReceiveContext.receive = PendingReceiveAck(queue, buffer, pendingResult) - key.interestOps(key.interestOps() & ~SelectionKey.OP_READ) } else { queue.complete() } + + key.interestOps(key.interestOps() & ~SelectionKey.OP_READ) + case PendingReceiveAck(receiveQueue, receiveBuffer, pendingResult) if pendingResult.isCompleted => pendingResult.value.get match { case Success(QueueOfferResult.Enqueued) =>