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

dvizz fails to start if no service is running #11

Closed
liske opened this issue Oct 1, 2017 · 2 comments
Closed

dvizz fails to start if no service is running #11

liske opened this issue Oct 1, 2017 · 2 comments
Labels

Comments

@liske
Copy link
Collaborator

liske commented Oct 1, 2017

Starting dvizz on a docker swarm w/o any running service will result in a panic:

$ docker run -v /var/run/docker.sock:/var/run/docker.sock -p 6969:6969 -it --rm liske/dvizz
Starting WebSocket server at port 6969
Starting WebSocket server
Starting event sender goroutine...
panic: interface conversion: interface {} is nil, not []main.DService

goroutine 8 [running]:
main.convServices(0xa98588, 0x0, 0x0, 0x0, 0xa98588, 0x0)
        /dvizz/converters.go:67 +0xe0
main.publishServices(0xc420114090)
        /dvizz/main.go:108 +0x80
created by main.main
        /dvizz/main.go:50 +0x14e

@eriklupander I'm not a go developer - maybe you could give it a look?

@liske liske added the bug label Oct 1, 2017
@eriklupander
Copy link
Owner

@liske I'm on it.

@eriklupander
Copy link
Owner

I've added some nil and empty-slice checks as well as some unit tests.

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

No branches or pull requests

2 participants