update main.c

added ntwkwait after receive init