I also removed the sleep before readLine() call in peerlistener, not needed.