File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -512,6 +512,9 @@ pub async fn run_server(config: Config) -> anyhow::Result<()> {
512512 fs:: remove_file ( DAEMON_SOCKET_PATH ) ?;
513513 }
514514
515+ debug ! ( "Binding socket file at {DAEMON_SOCKET_PATH}" ) ;
516+ let uds = UnixListener :: bind ( DAEMON_SOCKET_PATH ) ?;
517+
515518 // change owner group for socket file
516519 // get the group ID by name
517520 let group = Group :: from_name ( DAEMON_SOCKET_GROUP ) ?. ok_or_else ( || {
@@ -528,8 +531,6 @@ pub async fn run_server(config: Config) -> anyhow::Result<()> {
528531 debug ! ( "Setting permissions for socket file at {DAEMON_SOCKET_PATH} to 0x660" ) ;
529532 fs:: set_permissions ( DAEMON_SOCKET_PATH , fs:: Permissions :: from_mode ( 0o660 ) ) ?;
530533
531- debug ! ( "Binding socket file at {DAEMON_SOCKET_PATH}" ) ;
532- let uds = UnixListener :: bind ( DAEMON_SOCKET_PATH ) ?;
533534 let uds_stream = UnixListenerStream :: new ( uds) ;
534535
535536 info ! ( "Defguard daemon version {VERSION} started, listening on socket {DAEMON_SOCKET_PATH}" , ) ;
You can’t perform that action at this time.
0 commit comments