fix: Don't use getAddress in start/stop of local-discovery - #1136
Conversation
gmaclennan
left a comment
There was a problem hiding this comment.
I think maybe return the port from #start(), then set this.#port in start(), to avoid the implicit expectation that #start() sets a class prop that start() then reads. Functionality will be the same, it's just more explicit for future maintenance here.
|
The stop-start-state-machine module doesn't allow for returning values from I could do the getAddress call inside |
Ah ok, i should maybe fix that in the upstream module if possible. That was a bit of a nitpick anyway. Doesn't calling |
|
Agreed that we should go back to 9a8e882 Is there a chance the server could stop before |
Part of #1092
This helped resolve an error where
getAddresswas being called before the server was initialized far enough that a port was available.https://github.com/digidem/comapeo-core/pull/1092/files#diff-d8bdd8fc92679bb449fd7b40b9639551d54590cec4402c10bd4f03fa9c95c4b1L291