Fix states for processing task.
Add default metric results prior to message processing.
Fix issues with connection closing.