flomesh-io / pipy

Pipy is a programmable proxy for the cloud, edge and IoT.
https://flomesh.io/pipy
Other
776 stars 73 forks source link

after execute exec filter the pipy crash and restart #117

Closed sixinyiyu closed 2 years ago

sixinyiyu commented 2 years ago

version -info:

Version : nightly-202207101146 Commit : 9a327f8c06bce990e20fcc4b6435ff49181afc51 Commit Date : Sat, 9 Jul 2022 17:19:49 +0800 Host : Linux-4.19.90-17.ky10.x86_64 x86_64 OpenSSL : OpenSSL 1.1.1q 5 Jul 2022 Builtin GUI : Yes Tutorial : Yes

pipy()

.listen(18080)
  .demuxHTTP('req')

.pipeline('req')
  .exec('ls -l').print()
  .replaceMessage(
    msg => (
      new Message(
      {
        headers: {
          'content-type': 'application/json'
        }
      },
      JSON.encode(msg.head))
    )
  )

result:

output the dir files and restart pipy

naqvis commented 2 years ago

I did the test and confirm that commit# https://github.com/flomesh-io/pipy/commit/949ca3ad405ae2be38e876aaddc799b7e55d34b6 fixes this issue 👍