Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
akolosov-n committed Aug 21, 2024
1 parent 0a74d7f commit de77a9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public CoapPacket createResponse(Code responseCode) {

public CoapPacket createResponseFrom(CoapResponse coapResponse) {
CoapPacket response = new CoapPacket(this.getRemoteAddress());
response.setTransportContext(this.transportContext.with(coapResponse.getTransContext()));
response.setTransportContext(coapResponse.getTransContext());
response.setCode(coapResponse.getCode());
response.setToken(getToken());
response.setPayload(coapResponse.getPayload());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ void shouldUseTransportContextFromResponse() {
newCoapPacket(LOCAL_5683).mid(1300).token(13).post().uriPath("/test2").payload("test").context(TransportContext.of(DUMMY_KEY_IN, true)).build(), service
);

assertEquals(newCoapPacket(LOCAL_5683).ack(Code.C205_CONTENT).mid(1300).token(13).payload("ok").context(TransportContext.of(DUMMY_KEY_IN, true).with(DUMMY_KEY_OUT, true)).build(), resp.join());
assertEquals(newCoapPacket(LOCAL_5683).ack(Code.C205_CONTENT).mid(1300).token(13).payload("ok").context(TransportContext.of(DUMMY_KEY_OUT, true)).build(), resp.join());
}
}

0 comments on commit de77a9c

Please sign in to comment.