Log the message data when receiving an unknown message type
When trying to FCP-subscribe to something for which a subscription exists already, tell the client which one it is.
Improve sequential subscription filing:
- Greatly reduce the probability of subscribing multiple times: After filing a subscription, instead of immediately scheduling the next execution of run() and therefore checkSubscriptions(), don't schedule it. Instead, make the SubscriptionSucceededHandler schedule execution. If the SubscriptionSucceededHandler is never called, it will still be filed due to the regular scheduling of run() for pinging.
- Also, add an ErrorHandler which properly logs FCP error messages such as "Subscription exists already"
Make subscribe() execute the keepalive loop immediately so subscriptions get processed quickly even after start() has been called.
Don't duplicate checkSubscriptions() functionality in unsubscribe():
- unsubscribe() already schedules the keepalive loop to let checkSubscriptions() deal with unsubscribing.
- Also, schedule the keepalive loop quickly
- Adapt disconnect() to the new behavior of checkSubscriptions()