aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2016-04-18 02:08:59 -0700
committerJakob Odersky <jakob@odersky.com>2016-04-18 02:08:59 -0700
commit36721ebc573e1bb5f3e3ab74ed2feb0f6bf0b6e7 (patch)
tree5ed18d8078820057652c77573484e9b8889ed0dc
parent97ed5329395bc5bd1efed2e66e83a6e824cc1cbe (diff)
downloadakka-serial-36721ebc573e1bb5f3e3ab74ed2feb0f6bf0b6e7.tar.gz
akka-serial-36721ebc573e1bb5f3e3ab74ed2feb0f6bf0b6e7.tar.bz2
akka-serial-36721ebc573e1bb5f3e3ab74ed2feb0f6bf0b6e7.zip
Don't close stream when input is closed on creation
-rw-r--r--flow-stream/src/main/scala/com/github/jodersky/flow/stream/impl/SerialConnectionLogic.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/flow-stream/src/main/scala/com/github/jodersky/flow/stream/impl/SerialConnectionLogic.scala b/flow-stream/src/main/scala/com/github/jodersky/flow/stream/impl/SerialConnectionLogic.scala
index 526ea40..8af106f 100644
--- a/flow-stream/src/main/scala/com/github/jodersky/flow/stream/impl/SerialConnectionLogic.scala
+++ b/flow-stream/src/main/scala/com/github/jodersky/flow/stream/impl/SerialConnectionLogic.scala
@@ -110,7 +110,9 @@ private[stream] class SerialConnectionLogic(
connectionPromise.success(Serial.Connection(port, settings)) //complete materialized value
stageActor unwatch manager
stageActor watch operator
- pull(in) // start pulling input
+ if (!isClosed(in)) {
+ pull(in) // start pulling input
+ }
case other =>
val ex = new StreamSerialException(s"Stage actor received unknown message [$other]")