Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Web socket service goes down for the count on errors, rather than restarting #201

Closed
davidw opened this Issue · 5 comments

2 participants

@davidw
Owner

I wrote some bad code in my web socket controller, and it crashed.

So far, so good, it took some other stuff down with it that was then restarted, I fixed my code, and reloaded the page I'm working on. However, the web socket controller was still dead.

It turns out that it's only started when boss starts.

Maybe boss_service_worker should perform this call?

 boss_websocket_router:register(ServiceUrl, Service),
@davidw
Owner

This code seems to fix things:

davidw@1d515dd

@evanmiller
Owner

Should there also be some extra logic in "terminate"? I don't know as I haven't dug into the WS code too deeply.

@davidw
Owner

I don't know... I'm fine if it all just dies and you lose the web socket PID's. This is, for the time being, mostly just a debugging thing: if I screw up my WS code and it crashes, it'd be nice not to have to reload the whole server.

@evanmiller
Owner

Ok... well if it's working for you feel free to send me a pull request and I'll get it merged in.

@davidw
Owner

Closed by #203

@davidw davidw closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.