Issue #9. Fixed the break in sockets loop