Update peerProcess.java

Moved scanner out of while loop