Skip to content

Commit

Permalink
pit+fwdp: fix TX HopLimit calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
yoursunny committed Dec 30, 2024
1 parent 8ab5b11 commit f02f224
Show file tree
Hide file tree
Showing 10 changed files with 83 additions and 61 deletions.
25 changes: 25 additions & 0 deletions app/fwdp/fwdptest/interest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,31 @@ func TestHopLimit(t *testing.T) {
assert.Equal(1, collect4.Count())
}

func TestHopLimitLooped(t *testing.T) {
assert, require := makeAR(t)
fixture := NewFixture(t)

face1, face2 := intface.MustNew(), intface.MustNew()
collect1 := intface.Collect(face1)
fixture.SetFibEntry("/A", "multicast", face1.ID)

face2.Tx <- ndn.MakeInterest("/A/1", ndn.HopLimit(16))

for hopLimit := 15; hopLimit > 0; hopLimit-- {
fixture.StepDelay()
sent := collect1.Clear()
require.Len(sent, 1)
interest := sent[0].Interest
require.NotNil(interest)
assert.EqualValues(hopLimit, interest.HopLimit)

face2.Tx <- ndn.MakeInterest(interest.Name, interest.HopLimit)
}

fixture.StepDelay()
assert.Equal(0, collect1.Count())
}

func TestCsHitMemory(t *testing.T) {
assert, _ := makeAR(t)
fixture := NewFixture(t)
Expand Down
7 changes: 2 additions & 5 deletions csrc/fwdp/fwd-interest.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,13 @@ SgForwardInterest(SgCtx* ctx0, FaceID nh) {
return SGFWDI_SUPPRESSED;
}

InterestGuiders guiders = {
.nonce = ctx->dnNonce,
.lifetime = PitEntry_GetTxInterestLifetime(ctx->pitEntry, now),
.hopLimit = PitEntry_GetTxInterestHopLimit(ctx->pitEntry),
};
InterestGuiders guiders = {.nonce = ctx->dnNonce};
bool hasNonce = PitUp_ChooseNonce(up, ctx->pitEntry, now, &guiders.nonce);
if (unlikely(!hasNonce)) {
N_LOGD("^ no-interest-to=%" PRI_FaceID " drop=nonces-rejected", nh);
return SGFWDI_NONONCE;
}
PitEntry_GetTxInterestIlHl(ctx->pitEntry, now, &guiders.lifetime, &guiders.hopLimit);
if (unlikely(guiders.hopLimit == 0)) {
N_LOGD("^ no-interest-to=%" PRI_FaceID " drop=hoplimit-zero", nh);
return SGFWDI_HOPZERO;
Expand Down
7 changes: 2 additions & 5 deletions csrc/fwdp/fwd-nack.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,12 @@ FwFwd_RxNackDuplicate(FwFwd* fwd, FwFwdCtx* ctx) {
PitUp* up = ctx->pitUp;
PitUp_AddRejectedNonce(up, up->nonce);

InterestGuiders guiders = {
.nonce = up->nonce,
.lifetime = PitEntry_GetTxInterestLifetime(ctx->pitEntry, now),
.hopLimit = PitEntry_GetTxInterestHopLimit(ctx->pitEntry),
};
InterestGuiders guiders = {.nonce = up->nonce};
bool hasAltNonce = PitUp_ChooseNonce(up, ctx->pitEntry, now, &guiders.nonce);
if (!hasAltNonce) {
return false;
}
PitEntry_GetTxInterestIlHl(ctx->pitEntry, now, &guiders.lifetime, &guiders.hopLimit);

Packet* outNpkt =
Interest_ModifyGuiders(ctx->pitEntry->npkt, guiders, &fwd->mp, Face_PacketTxAlign(up->face));
Expand Down
5 changes: 3 additions & 2 deletions csrc/pcct/pit-dn.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ typedef struct PitDn {
uint32_t nonce; ///< downstream's nonce
FaceID face;
uint8_t congMark;
bool canBePrefix; ///< Interest has CanBePrefix?
LpPitToken token; ///< downstream's token
uint8_t txHopLimit; ///< downstream's HopLimit minus one
bool canBePrefix; ///< Interest has CanBePrefix?
LpPitToken token; ///< downstream's token
} __rte_cache_aligned PitDn;
static_assert(sizeof(PitDn) <= RTE_CACHE_LINE_SIZE, "");

Expand Down
22 changes: 18 additions & 4 deletions csrc/pcct/pit-entry.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,11 @@ PitEntry_InsertDn(PitEntry* entry, Pit* pit, Packet* npkt) {
dn->congMark = lpl3->congMark;
dn->canBePrefix = interest->canBePrefix;
dn->nonce = interest->nonce;
NDNDPDK_ASSERT(interest->hopLimit > 0); // decoder rejects HopLimit=0
dn->txHopLimit = interest->hopLimit - 1;
uint32_t lifetime = RTE_MIN(interest->lifetime, PIT_MAX_LIFETIME);
dn->expiry = Mbuf_GetTimestamp(pkt) + TscDuration_FromMillis(lifetime);

// update txHopLimit
NDNDPDK_ASSERT(interest->hopLimit > 0); // decoder rejects HopLimit=0
entry->txHopLimit = RTE_MAX(entry->txHopLimit, interest->hopLimit - 1);

// record CanBePrefix and prefer CBP=1 for representative Interest
if (entry->npkt == npkt) {
// first DN record, entry->npkt and entry->nCanBePrefix are assigned in PitEntry_Init
Expand Down Expand Up @@ -260,3 +258,19 @@ PitEntry_ReserveUp(PitEntry* entry, FaceID face) {
PitUp_Reset(up, face);
return up;
}

void
PitEntry_GetTxInterestIlHl(PitEntry* entry, TscTime now, uint32_t* lifetime, uint8_t* hopLimit) {
*lifetime = TscDuration_ToMillis(entry->expiry - now);

*hopLimit = 0;
PitDn_Each (it, entry, false) {
PitDn* dn = it.dn;
if (dn->face == 0) {
break;
}
if (dn->expiry >= now) {
*hopLimit = RTE_MAX(*hopLimit, dn->txHopLimit);
}
}
}
19 changes: 3 additions & 16 deletions csrc/pcct/pit-entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ struct PitEntry {
struct {
uint32_t fibSeqNum; ///< FIB entry sequence number
uint8_t nCanBePrefix; ///< how many DNs want CanBePrefix?
uint8_t txHopLimit; ///< HopLimit for outgoing Interests
uint16_t fibPrefixL : PitFibPrefixLenBits_; ///< TLV-LENGTH of FIB prefix
bool mustBeFresh : 1; ///< entry for MustBeFresh 0 or 1?
bool hasSgTimer : 1; ///< whether timeout is set by strategy or expiry
Expand Down Expand Up @@ -75,7 +74,6 @@ PitEntry_Init(PitEntry* entry, Packet* npkt, const FibEntry* fibEntry) {
entry->expiry = 0;

entry->nCanBePrefix = (uint8_t)interest->canBePrefix;
entry->txHopLimit = 0;
entry->mustBeFresh = interest->mustBeFresh;

entry->dns[0].face = 0;
Expand Down Expand Up @@ -184,19 +182,8 @@ PitEntry_FindUp(PitEntry* entry, FaceID face);
__attribute__((nonnull)) PitUp*
PitEntry_ReserveUp(PitEntry* entry, FaceID face);

/**
* @brief Calculate InterestLifetime for TX Interest.
* @return InterestLifetime in millis.
*/
__attribute__((nonnull)) static inline uint32_t
PitEntry_GetTxInterestLifetime(PitEntry* entry, TscTime now) {
return TscDuration_ToMillis(entry->expiry - now);
}

/** @brief Calculate HopLimit for TX Interest. */
__attribute__((nonnull)) static inline uint8_t
PitEntry_GetTxInterestHopLimit(PitEntry* entry) {
return entry->txHopLimit;
}
/** @brief Calculate InterestLifetime and HopLimit for TX Interest. */
__attribute__((nonnull)) void
PitEntry_GetTxInterestIlHl(PitEntry* entry, TscTime now, uint32_t* lifetime, uint8_t* hopLimit);

#endif // NDNDPDK_PCCT_PIT_ENTRY_H
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ require (
github.com/dylandreimerink/gobpfld v0.6.0
github.com/functionalfoundry/graphqlws v0.0.0-20200611113535-7bc58903ce7b
github.com/gogf/greuse v1.1.0
github.com/gopacket/gopacket v1.3.1-0.20241004220047-bd3b6d6928cf
github.com/gopacket/gopacket v1.3.1
github.com/gorilla/schema v1.4.1
github.com/graphql-go/graphql v0.8.1
github.com/ianlancetaylor/cgosymbolizer v0.0.0-20241025222116-6b205f073fdd
github.com/ianlancetaylor/cgosymbolizer v0.0.0-20241129212102-9c50ad6b591e
github.com/jacobsa/fuse v0.0.0-20241025064006-8ccd61173b05
github.com/jfoster/binary-utilities v0.2.1
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
Expand All @@ -43,8 +43,8 @@ require (
go.fd.io/govpp/extras v0.1.0
go.uber.org/zap v1.27.0
go4.org v0.0.0-20230225012048-214862532bf5
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c
golang.org/x/sys v0.27.0
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67
golang.org/x/sys v0.28.0
)

require (
Expand All @@ -71,8 +71,8 @@ require (
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/term v0.25.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/term v0.27.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
31 changes: 16 additions & 15 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM=
github.com/gopacket/gopacket v1.3.1-0.20241004220047-bd3b6d6928cf h1:FUVg/JK6YSOCM6i2XlMhTFBHxfAz6CzdhzifCkvmT3E=
github.com/gopacket/gopacket v1.3.1-0.20241004220047-bd3b6d6928cf/go.mod h1:WnFrU1Xkf5lWKV38uKNR9+yYtppn+ZYzOyNqMeH4oNE=
github.com/gopacket/gopacket v1.3.1 h1:ZppWyLrOJNZPe5XkdjLbtuTkfQoxQ0xyMJzQCqtqaPU=
github.com/gopacket/gopacket v1.3.1/go.mod h1:3I13qcqSpB2R9fFQg866OOgzylYkZxLTmkvcXhvf6qg=
github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g=
github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k=
github.com/gorilla/schema v1.4.1 h1:jUg5hUjCSDZpNGLuXQOgIWGdlgrIdYvgQ0wZtdK1M3E=
Expand Down Expand Up @@ -281,8 +281,8 @@ github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKEN
github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
github.com/ianlancetaylor/cgosymbolizer v0.0.0-20241025222116-6b205f073fdd h1:ZQWb/5KPclX4ztaKJaC0Esm6qLmjKjl0C3cYsg9Qi0s=
github.com/ianlancetaylor/cgosymbolizer v0.0.0-20241025222116-6b205f073fdd/go.mod h1:DvXTE/K/RtHehxU8/GtDs4vFtfw64jJ3PaCnFri8CRg=
github.com/ianlancetaylor/cgosymbolizer v0.0.0-20241129212102-9c50ad6b591e h1:8AnObPi8WmIgjwcidUxaREhXMSpyUJeeSrIkZTXdabw=
github.com/ianlancetaylor/cgosymbolizer v0.0.0-20241129212102-9c50ad6b591e/go.mod h1:DvXTE/K/RtHehxU8/GtDs4vFtfw64jJ3PaCnFri8CRg=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
Expand Down Expand Up @@ -524,8 +524,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw=
golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U=
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
Expand All @@ -536,8 +536,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c h1:7dEasQXItcW1xKJ2+gg5VOiBnqWrJc+rq0DPKyvvdbY=
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8=
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 h1:1UoZQm6f0P/ZO0w1Ri+f+ifG/gXhegadRdwBIXEFWDo=
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
Expand Down Expand Up @@ -612,8 +612,8 @@ golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down Expand Up @@ -724,13 +724,14 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24=
golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M=
golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q=
golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand All @@ -741,8 +742,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
"type": "module",
"main": "build/js/mod.js",
"types": "js/mod.ts",
"packageManager": "[email protected].0+sha512.76e2379760a4328ec4415815bcd6628dee727af3779aaa4c914e3944156c4299921a89f976381ee107d41f12cfa4b66681ca9c718f0668fa0831ed4c6d8ba56c",
"packageManager": "[email protected].2+sha512.93e57b0126f0df74ce6bff29680394c0ba54ec47246b9cf321f0121d8d9bb03f750a705f24edc3c1180853afd7c2c3b94196d0a3d53d3e069d9e2793ef11f321",
"dependencies": {
"graphql": "^16.9.0",
"graphql": "^16.10.0",
"graphql-request": "^6.1.0",
"isomorphic-ws": "^5.0.0",
"it-pushable": "^3.2.3",
"throat": "^6.0.2",
"tslib": "^2.8.1",
"type-fest": "^4.30.0",
"type-fest": "^4.31.0",
"ws": "^8.18.0"
},
"devDependencies": {
"@types/ws": "^8.5.13",
"@yoursunny/xo-config": "0.59.0",
"json-stable-stringify": "^1.1.1",
"@yoursunny/xo-config": "0.60.0",
"json-stable-stringify": "^1.2.1",
"markdownlint-cli": "^0.43.0",
"ts-json-schema-generator": "^2.3.0",
"typescript": "~5.7.2"
Expand Down
4 changes: 2 additions & 2 deletions sample/status/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class App extends Component<{}, State> {

override async componentDidMount() {
this.handleHashChange();
window.addEventListener("hashchange", this.handleHashChange);
globalThis.addEventListener("hashchange", this.handleHashChange);

const workers = await client.request<ReadonlyArray<Worker<WorkerRole | "">>>(gql`
{
Expand All @@ -69,7 +69,7 @@ class App extends Component<{}, State> {
}

override componentWillUnmount() {
window.removeEventListener("hashchange", this.handleHashChange);
globalThis.removeEventListener("hashchange", this.handleHashChange);
}

override render() {
Expand Down

0 comments on commit f02f224

Please sign in to comment.