Stop listening if data is empty

This fixes an infinite loop where we keep getting  0 length data.