When (*Config).TransportModuleConfig is set, call to (*core).Instantiate() will fail with error message: water: memFS.WriteFile returned error: success.
Expected Behavior
The call to (*core).Instantiate() should either succeed or fail with an intuitive error. "success" is not considered an intuitive error.
Observation
When
(*Config).TransportModuleConfig
is set, call to(*core).Instantiate()
will fail with error message:water: memFS.WriteFile returned error: success
.Expected Behavior
The call to
(*core).Instantiate()
should either succeed or fail with an intuitive error. "success" is not considered an intuitive error.Problem
https://github.com/refraction-networking/water/blob/b72fffc3eff3b222c678793ddea0c98583cbb818/core.go#L394-L397
The above logic is incorrect. To ignore
nil
error and systemerrno 0
, the correct condition for the if statement will be: