Skip to content

Should use the options given in instantiation, but it doesnt #580

Closed
@alesmenzelsocialbakers

Description

@alesmenzelsocialbakers

Note: for support questions, please use one of these channels: stackoverflow or slack

You want to:

  • report a bug
  • request a feature

Current behaviour

Creating new instance of engine.io and then attaching it to a http server does not carry on the path option given when instantiating. See repro:

Steps to reproduce (if the current behaviour is a bug)

const engine = require('engine.io');
const eio = engine({ path: '/eio' });
eio.attach(http.createServer());
// eio is listening on the default /engine.io path instead of /eio - one must give the options again in attach to make it work

Expected behaviour

Attaching the engine.io instance to the correct path specified in the constructor unless override is given in attach(srv, { path: '/override-eio' }).

Setup

  • engine.io version: latest

Other information (e.g. stacktraces, related issues, suggestions how to fix)

Options passed as parameter should respect constructor parameters.
https://github.com/socketio/engine.io/blob/master/lib/server.js#L438

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions