Handled cases where TCP messages did not arrive as a whole