socket errors processing in tcp plugin