From 235f238027b0d7bd5166736c6a346269a00fbf40 Mon Sep 17 00:00:00 2001 From: Jason Longshore Date: Fri, 29 Jun 2018 13:36:45 -0500 Subject: [PATCH] Unix Domain Socket - Deregister interest in READ when reaching EOF --- .../alpakka/unixdomainsocket/scaladsl/UnixDomainSocket.scala | 1 + 1 file changed, 1 insertion(+) 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..0ad11194cd 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 @@ -170,6 +170,7 @@ object UnixDomainSocket extends ExtensionId[UnixDomainSocket] with ExtensionIdPr sendReceiveContext.receive = PendingReceiveAck(queue, buffer, pendingResult) key.interestOps(key.interestOps() & ~SelectionKey.OP_READ) } else { + key.interestOps(key.interestOps() & ~SelectionKey.OP_READ) queue.complete() } case PendingReceiveAck(receiveQueue, receiveBuffer, pendingResult) if pendingResult.isCompleted =>