Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

feat: handle no addresses #185

Merged
merged 1 commit into from
Mar 30, 2020
Merged

feat: handle no addresses #185

merged 1 commit into from
Mar 30, 2020

Conversation

Stebalien
Copy link
Member

If we aren't listening on any addresses, we should return no addresses, not an error.

@willscott
Copy link
Contributor

hopefully, fix the broken test / file an issue:

--- FAIL: TestSimultDials (0.02s)
panic: runtime error: index out of range [0] with length 0 [recovered]
	panic: runtime error: index out of range [0] with length 0

the change seems functionally safe, although i was suspicious enough of indexing into a nil slice that I made sure i could compile/run that line without a panic.

@Stebalien
Copy link
Member Author

That's definitely a bug.

If we aren't listening on any addresses, we should return no addresses, not an error.
@Stebalien Stebalien force-pushed the fix/listenaddr-err branch from cc898d6 to 1db72f7 Compare March 30, 2020 05:35
@Stebalien Stebalien requested a review from willscott March 30, 2020 05:35
@Stebalien Stebalien merged commit 5c22862 into master Mar 30, 2020
@Stebalien Stebalien deleted the fix/listenaddr-err branch March 30, 2020 06:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants