[fix #43] clear socket in case of error

And also put assignRequestSockets() call in infinite loop.