Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition in the display argument provider API #235

Closed
Gama11 opened this issue Jun 6, 2018 · 6 comments
Closed

Race condition in the display argument provider API #235

Gama11 opened this issue Jun 6, 2018 · 6 comments

Comments

@Gama11
Copy link
Member

Gama11 commented Jun 6, 2018

It seems that if a display arguments provider calls the callback too quickly, there's a race condition and the init fails. With vshaxe-build, I was usually greeted with an error message like this when reloading the window:

Haxe language server started
Haxe server restart requested: display arguments changed
Restarted Haxe server: display arguments changed
Listening on port 6000
Listening on port 6000
events.js:163
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE 127.0.0.1:6000
    at Object.exports._errnoException (util.js:1050:11)
    at exports._exceptionWithHostPort (util.js:1073:20)
    at Server.setupListenHandle [as _listen2] (net.js:1263:14)
    at listenInCluster (net.js:1304:12)
    at doListen (net.js:1428:7)
    at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:62:16)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:78:10)

After which completion wouldn't work anymore.

I don't think I've never experienced the problem with the Lime extension (it needs to launch a lime display process first and read the results from that, so it would take a bit anyway / probably never becomes an issue).

For now I'll just work around this by adding a haxe.Timer.delay() in vshaxe-build, but we need to investigate this and find the cause.

Gama11 added a commit to vshaxe/vshaxe-build that referenced this issue Jun 6, 2018
@ncannasse
Copy link
Member

Got this just now. I might have overlook it but I didn't see the message "The Haxe server crashed 5 times"

@ncannasse
Copy link
Member

Ok, got it again and this time I had the message, seems related to #250 then

@Gama11 Gama11 closed this as completed in 90aabbc Jul 11, 2018
@ncannasse
Copy link
Member

Was it closed after the release ? Because I still got it with 2.1.0 ;)

@Gama11
Copy link
Member Author

Gama11 commented Jul 12, 2018

Yes, the fix is not in 2.1.0.

@ncannasse
Copy link
Member

When is 2.1.1 :D ?

@Gama11
Copy link
Member Author

Gama11 commented Jul 19, 2018

Now it's out, but with 2.2.0. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants