@@ -1095,15 +1095,18 @@ static struct io_plan *pass_client_hsmfd(struct io_conn *conn,
10951095 status_debug ("new_client: %" PRIu64 , dbid );
10961096 new_client (c , c -> chainparams , & id , dbid , capabilities , fds [0 ]);
10971097
1098- proxy_stat rv = proxy_handle_pass_client_hsmfd (& id , dbid , capabilities );
1099- if (PROXY_PERMANENT (rv ))
1100- status_failed (STATUS_FAIL_INTERNAL_ERROR ,
1101- "proxy_%s failed: %s" , __FUNCTION__ ,
1102- proxy_last_message ());
1103- else if (!PROXY_SUCCESS (rv ))
1104- return bad_req_fmt (conn , c , msg_in ,
1105- "proxy_%s error: %s" , __FUNCTION__ ,
1106- proxy_last_message ());
1098+ // Skip zero dbid (master, gossipd, connectd).
1099+ if (dbid != 0 ) {
1100+ proxy_stat rv = proxy_handle_pass_client_hsmfd (& id , dbid , capabilities );
1101+ if (PROXY_PERMANENT (rv ))
1102+ status_failed (STATUS_FAIL_INTERNAL_ERROR ,
1103+ "proxy_%s failed: %s" , __FUNCTION__ ,
1104+ proxy_last_message ());
1105+ else if (!PROXY_SUCCESS (rv ))
1106+ return bad_req_fmt (conn , c , msg_in ,
1107+ "proxy_%s error: %s" , __FUNCTION__ ,
1108+ proxy_last_message ());
1109+ }
11071110
11081111 /*~ We stash this in a global, because we need to get both the fd and
11091112 * the client pointer to the callback. The other way would be to
0 commit comments