Clear the stratum socket whenever we are closing it since the buffer is going to be reused.