Stream sockets behavior on exceptions fixed. Long running mode now works just fine.