Giter Club home page Giter Club logo

Comments (8)

tuzmusic avatar tuzmusic commented on May 18, 2024 6

I'm having a similar "already listening" problem, and I tried

new Server('socketioserverurl', {
     forceNew: true,
     reconnection: false
})

and first typescript said those weren't valid keys, and when I @ts-ignore that error, I still have the same 'already listening' problem.

from mock-socket.

Foxhoundn avatar Foxhoundn commented on May 18, 2024 3

Sorry, It's actually server.stop(), but that doesn't really matter since that one does not work either :)

from mock-socket.

thoov avatar thoov commented on May 18, 2024

@Foxhoundn Thanks for finding this. Let me dig into it and see what is happening

from mock-socket.

thoov avatar thoov commented on May 18, 2024

Because I don't have access to your store/actions its going to be hard for me to debug. Are you able to create a simpler example of this bug without hitting a store?

from mock-socket.

Chalisi avatar Chalisi commented on May 18, 2024

In the meantime I found that force a new connection avoid this issue. But if one test fail all the following tests will trigger this Error: A mock server is already listening on this url error.

new Server('socketioserverurl', {
     forceNew: true,
     reconnection: false
})

Is it possible that the problem is due to reconnection activated by default?

from mock-socket.

spacehash avatar spacehash commented on May 18, 2024

I'm also getting this error when I attempt multiple vitest cases, both concurrent and non-concurrent

from mock-socket.

Atrue avatar Atrue commented on May 18, 2024

@spacehash Can you please provide a minimal reproducible test case?

from mock-socket.

dhulme avatar dhulme commented on May 18, 2024

In my case it was a sign of a bug in my code/test which was causing it not to reach the close call

from mock-socket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.