THESE HAVE BEEN FIXED AND WORK!!!!!!!!!!!!!
They both go in a loop and when done command is issued, the both stop and close the sockets!!!!!!
Merge remote-tracking branch 'origin/master'