try to prevent sending empty messages

by checking the message size before setting the send flag