adonisjs/adonis-fullstack-app

Middleware socket needn't wait next()?

phambinh217 opened this issue · 0 comments

Dear,
I created a middleware

'use strict'

class CustomMiddleware {
  // for HTTP
  async handle (ctx, next) {
   // no call next() function()
  }

  // for WebSocket
  async wsHandle (ctx, next) {
   // no call next() function
  }
}

module.exports = CustomMiddleware

When I use this middleware for http request, the request never go to my controller because I don't call the next() function on handle(). But the socket request doesn't same, it still go to my controller. Is it a bug, or what am I doing wrong?

I using adonisjs 4.1. my node version is 10.x