untu / comedy

Node.js actor framework.
Eclipse Public License 1.0
653 stars 36 forks source link

fix(debug): increment inspect port #37

Closed balazser closed 3 years ago

balazser commented 5 years ago

Forking actors during debugging causes the following error for me:

Starting inspector on 0.0.0.0:9229 failed: address already in use

This is because the port number is not incremented.

In this fix I'm passing the current number of an actor to itself then I'm checking the debug and inspect flags in the args to determine do I need to increment the port and fork a process in debug mode.

codecov-io commented 5 years ago

Codecov Report

Merging #37 into master will decrease coverage by 0.15%. The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #37      +/-   ##
==========================================
- Coverage   84.89%   84.73%   -0.16%     
==========================================
  Files          43       43              
  Lines        1940     1946       +6     
==========================================
+ Hits         1647     1649       +2     
- Misses        293      297       +4
Impacted Files Coverage Δ
lib/actor-system.js 84.77% <100%> (ø) :arrow_up:
lib/forked-actor-parent.js 83.95% <53.84%> (-4.05%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cdbfd95...fcceba7. Read the comment docs.

balazser commented 5 years ago

I extracted the logic to a new function, but because I did not found similar tests I'm not sure where would you test it and how. I should have ForkedActorParent initialized.

weekens commented 5 years ago

Fixed AppVeyor build by re-running. Looks like an AppVeyor's internal issue. Please add missing method comment and we'll be done.