Handle {error, einval} from gen_tcp:send/2