diff --git a/src/wormhole/servers/cmd_server.py b/src/wormhole/servers/cmd_server.py index a894ed5..b7864ad 100644 --- a/src/wormhole/servers/cmd_server.py +++ b/src/wormhole/servers/cmd_server.py @@ -10,7 +10,8 @@ class MyPlugin: # accept --reactor= selection from .relay import RelayServer return RelayServer(self.args.rendezvous, self.args.transit, - self.args.advertise_version) + self.args.advertise_version, + "relay.sqlite") def start_server(args): from twisted.python import usage diff --git a/src/wormhole/servers/relay.py b/src/wormhole/servers/relay.py index 3a6fd7c..cf25183 100644 --- a/src/wormhole/servers/relay.py +++ b/src/wormhole/servers/relay.py @@ -383,9 +383,10 @@ class Root(resource.Resource): self.putChild("", static.Data("Wormhole Relay\n", "text/plain")) class RelayServer(service.MultiService): - def __init__(self, relayport, transitport, advertise_version): + def __init__(self, relayport, transitport, advertise_version, + db_url=":memory:"): service.MultiService.__init__(self) - self.db = get_db("relay.sqlite") + self.db = get_db(db_url) welcome = { "current_version": __version__, # adding .motd will cause all clients to display the message,