Skip to content

Commit

Permalink
snabb config listen: fix bug introduced in bfa68ba
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeneia committed Oct 10, 2022
1 parent 4aa473b commit 18d2631
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/program/config/listen/listen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,14 @@ function run(args)
common.print_and_exit(args)
end
local caller = rpc.prepare_caller('snabb-config-leader-v1')
local leader = common.open_socket_or_die(args.instance_id)
local leader = common.open_socket(args.instance_id)
if not leader then
io.stderr:write(
("Could not connect to config leader socket on Snabb instance %q\n")
:format(args.instance_id)
)
main.exit(1)
end
attach_listener(leader, caller, args.schema_name, args.revision_date)

local handler = require('lib.fibers.file').new_poll_io_handler()
Expand Down

0 comments on commit 18d2631

Please sign in to comment.