Fix staling main loop if alloc fails in TCP
Check send() return values