Giter Club home page Giter Club logo

Comments (4)

ctron avatar ctron commented on August 16, 2024

This seem to cause two issues for me:
a) Shutting down a server will trigger the client to throw "unknown endpoint" exceptions
b) Running with different class loaders causes "Address in use" exceptions although servers are shut down

So this may seem a bit esoteric, but in fact it is not. a) is easily triggered when you activate Milo as an optional component and then later deactivate it. The port is kept open and the server log will record "unkown endpoint" exceptions although the service should be disposed. b) Is triggered when you are running unit tests, like with surefire, which puts unit tests in different class loaders. So the "static" allServers collections is actually instantiated multiple times.

from milo.

kevinherron avatar kevinherron commented on August 16, 2024

@ctron the PR includes a test, but maybe you can verify this fix works in your use case?

from milo.

ctron avatar ctron commented on August 16, 2024

I can give it a try. I have a reproducible case with Maven and unit tests.

from milo.

ctron avatar ctron commented on August 16, 2024

👍 I can confirm that this works.

Here is what I did:

  • switch to branch
  • mvn clean install
  • remove my workaround -> fork all unit tests
  • run my unit tests -> OK
  • switch back to master branch
  • mvn clean install -> old version is back
  • run my unit tests -> failure: "Address already in use"
  • re-apply my workaround
  • run my unit tests -> OK

from milo.

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.