Fix data race detected by go's race detector

Just need to lock around conn.stale use.