Move the to_be_completed = 1 inside of TCP/IP task to avoid possible/rare race condition.

Signed-off-by: Mike Stitt <mikes@spindance.com>