[WFLY-3834] make sure the message is fully read

fix for the mgmt protocol related to https://issues.jboss.org/browse/WFLY-3834 
This check is not guaranteed to work.  You can safely just jump into the while loop though.