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

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

@phambinh217

Description

@phambinh217

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions