Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Middleware socket needn't wait next()? #41

Open
phambinh217 opened this issue Mar 30, 2019 · 0 comments
Open

Middleware socket needn't wait next()? #41

phambinh217 opened this issue Mar 30, 2019 · 0 comments
Labels

Comments

@phambinh217
Copy link

phambinh217 commented Mar 30, 2019

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant