diff --git a/packages/rsocket-core/src/RSocketMachine.js b/packages/rsocket-core/src/RSocketMachine.js index ae545bcc..02bbb3cc 100644 --- a/packages/rsocket-core/src/RSocketMachine.js +++ b/packages/rsocket-core/src/RSocketMachine.js @@ -888,7 +888,8 @@ class RSocketMachineImpl implements RSocketMachine { flags |= FLAGS.COMPLETE; this._subscriptions.delete(streamId); } - if (payload.metadata !== undefined) { + if (payload.metadata !== undefined && + payload.metadata !== null) { // eslint-disable-next-line no-bitwise flags |= FLAGS.METADATA; }