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

fix for the mgmt protocol related to https://issues.jboss.org/browse/WFLY-3834