The annoying thing about doing network programming . . . my program stopped working for no apparent reason. Time to debug! I tried one or two little things - no change - then gave up and added a bunch of error checking.
In the time it took me to write the error checking, the problem went away.