Skip to content

Commit

Permalink
fixup! refactor(coap-server): refactor request handling
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Jul 26, 2023
1 parent c1a0776 commit de07c04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/binding-coap/src/coap-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export default class CoapServer implements ProtocolServer {
}

const content = ContentSerdes.get().valueToContent(thing.getThingDescription(), undefined, contentType);
const payload = await ProtocolHelpers.readStreamFully(content.body);
const payload = await content.toBuffer();

debug(`Sending CoAP response for TD with Content-Format ${contentType}.`);
this.sendContentResponse(res, payload, contentType);
Expand Down

0 comments on commit de07c04

Please sign in to comment.