* Fixed possible incomplete defferals

* Fixed asynchroneus task processing with race condition to flushtransport
* Added keep-alive functionality