unexpected end of JSON input
Homework 2 forum
TestGossiper download parallel multiple
My guess is that the buffer that you initialize for reading from a UDP socket is too small (i.e., something like buf = make(byte, X)). X has to be bigger than the default chunk size + other headers. Otherwise, your gossiper reads only a part of a data reply gossip packet and hence it ends up with an incorrect json encoding (since the end is missing).
Does it help?