Hey Larsson - based on debug messages when running live I would guess that 
you miss `pull(sslIn)` somewhere. I have a hypothesis for what's going on. 
Let's take a look at:

```
setHandler(bytesOut, new OutHandler {
  override def onPull() = state match {
    case Connecting =>
    case Authenticating =>
    case Subscribing =>
    case Subscribed => pull(sslIn)
  }
})
```

You're pulling just when in `Subscribed` state. That means that if 
`bytesOut.onPull` was called before Stage went into `Subscribed` state then 
`pull(sslIn)` will not get called. Therefore we need to ensure that pull 
will be called even in that case. You can do this by e.g. adding:

```scala
if (subscriptionValid(event)) {
  state = Subscribed
  logger.info(state.toString)
  if (isAvailable(sslIn)) {
    pull(sslIn)
  }
}
```

in `onPush` handler for `sslIn`.

To debug it I would add `println`s in all places we do `pull(sslIn)` just 
to be sure they're really are executed. In extreme case you can add println 
before all calls to `pull` and `push` - I know there will be a lot of 
output but will give you insight into what's going on.

BTW, I don't understand this one:

```scala
setHandler(bytesIn, new InHandler {
  override def onPush() = {
  }
}
```

Also, find it strange that your test works. You are not sending anything 
with `toBetfairProbe` (which simulates input port from TCP as far as I 
understand). I have not idea, maybe you pasted wrong code? 

Hope it will help, let us know in case of further troubles.

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to