The parameter current-libp2p-daemon is treated specially in start-libp2p-daemon!, but not within stop-libp2p-daemon!, which can cause problems when a program wants to start a libp2p-daemon, stop it, and start a new one all in the same Scheme process which shares the current-libp2p-daemon state.
Would it make sense for stop-libp2p-daemon! to set current-libp2p-daemon to false only if it's called with no arguments, but not do that if it's called with an argument?
Or would it make more sense for stop-libp2p-daemon! to set current-libp2p-daemon to false any time its argument is equal to (current-libp2p-daemon), whether that argument was implicit/default or explicit?
Or would it make more sense for start-libp2p-daemon! to rely less on current-libp2p-daemon instead?
The parameter
current-libp2p-daemonis treated specially instart-libp2p-daemon!, but not withinstop-libp2p-daemon!, which can cause problems when a program wants to start a libp2p-daemon, stop it, and start a new one all in the same Scheme process which shares thecurrent-libp2p-daemonstate.Would it make sense for
stop-libp2p-daemon!to setcurrent-libp2p-daemonto false only if it's called with no arguments, but not do that if it's called with an argument?Or would it make more sense for
stop-libp2p-daemon!to setcurrent-libp2p-daemonto false any time its argument is equal to(current-libp2p-daemon), whether that argument was implicit/default or explicit?Or would it make more sense for
start-libp2p-daemon!to rely less oncurrent-libp2p-daemoninstead?