Closed ConnorRigby closed 5 years ago
What's the race condition? Just wondering since the fix of adding a new process to fix a race condition seems strange.
I think the problem was that Nerves.Network.Config
was starting before Nerves.Network.IFSupervisor
, but it actually depended on it, so now the code that depends on IFSupervisor
is moved to a Task
after IFSupervisor
has started, right?
Actually, I think that's still the case: https://github.com/nerves-project/nerves_network/pull/105/files#diff-8af95e60bd806b0cef54791a680ac100R67
Wouldn't an easier solution be to start Nerves.Network.Config
after Nerves.Network.IFSupervisor
?
Yeah I was wondering that too, but I'd need to dig more into why it is the way it is now, so maybe Connor knows.
When I made config be the only process that calls system registry I got errors if it wasn't first, but come to think of it, it may have been the errors that this PR fixes. I'll try making Config start after Ifsupervisor again.
Well good catch guys. Turns out just moving the Config
genserver to start after everything else it eliminates the race. Updated PR coming
Thanks for the report @danielspofford