Allow packetDecoder to return promise

This commit is contained in:
2021-10-24 15:53:02 -05:00
parent 16dba70123
commit d494db0b29
2 changed files with 13 additions and 8 deletions

View File

@@ -27,7 +27,7 @@ export class RadiusService {
msg: Buffer
): Promise<{ data: Buffer; expectAcknowledgment?: boolean } | undefined> {
const { packet, secret } = packageInterface.packetDecoder
? packageInterface.packetDecoder(msg)
? await packageInterface.packetDecoder(msg)
: this.defaultDecoder(msg);
if (!packet) {