single strategy error in mac
ColderLee opened this issue · comments
LY commented
In Single strategy,setEnvs error in mac.
error message
panic: reflect: call of reflect.Value.Int on zero Value
goroutine 1 [running]:
reflect.Value.Int(...)
/usr/local/go/src/reflect/value.go:961
solution
Replace with below code will solve this problems.
v := reflect.ValueOf(l).Elem().FieldByName("fd").Elem().FieldByName("pfd")
fd = uintptr(v.FieldByName("Sysfd").Int())
Brandur Leach commented
Nice fix! I just ran into the same problem and came here to see if it was a general one.
Given the project seems to be broken out of the box for a common OS, does that mean it's effectively unmaintained/dead? I ask because I'm trying to decide on graceful restart library, and would love to know about what the accepted state of the art for this kind of thing is these days, if anyone has ideas.
(https://github.com/gobwas/graceful looks interesting, but has a more complex interface, and also hasn't been committed to in a while.)