Update Peer.java


Fixed "End of thread" freezing issue.

Minor enhancements.