Refactored and fixed handling of Task handling/sending and Task building
Optimized error handling when the Socket of the
SocketSessionInputListener throws an IOException