Closed stephen-soltesz closed 5 years ago
Totals | |
---|---|
Change from base Build 85: | 26.4% |
Covered Lines: | 262 |
Relevant Lines: | 289 |
Note: I've seen the error for both :9990 and :9393 (either server socket may fail to be available soon enough).
cmd/github_receiver/main_test.go, line 59 at r2 (raw file):
O_o -- so, I'm a bit baffled here. I was deceived by my workstation - there is a race. But, I don't see where it's coming from. The error reported: `Could not start metric server(error: listen tcp :9990: bind: address already in use)`. This implies to me that the process has not called or completed the underlying socket close. But, I'm calling http `Server.Close` which closes all listeners, which should release the socket before returning from the `defer` statements that call `Server.Close`. But, by observation, it takes some additional time after. The delay works around that, but why isn't the shutdown / close complete after returning from `Server.Close`?
Use ":0"
for your listen addresses.
This change is