# HG changeset patch # User Matthew Wild # Date 1647689916 0 # Node ID 6fe8ab3baa8530e22833c1b4866d3fa05892a6bd # Parent 3635b0bfbd551453f9e8b1e98e06c51648c1a730# Parent dd47adf74e9310d09deccf5572d851567d45837b Merge 0.12->trunk diff -r 3635b0bfbd55 -r 6fe8ab3baa85 plugins/mod_admin_socket.lua --- a/plugins/mod_admin_socket.lua Sat Mar 19 11:09:28 2022 +0000 +++ b/plugins/mod_admin_socket.lua Sat Mar 19 11:38:36 2022 +0000 @@ -62,8 +62,16 @@ sock = unix.stream(); sock:settimeout(0); os.remove(socket_path); - assert(sock:bind(socket_path)); - assert(sock:listen()); + local ok, err = sock:bind(socket_path); + if not ok then + module:log_status("error", "Unable to bind admin socket %s: %s", socket_path, err); + return; + end + local ok, err = sock:listen(); + if not ok then + module:log_status("error", "Unable to listen on admin socket %s: %s", socket_path, err); + return; + end if server.wrapserver then conn = server.wrapserver(sock, socket_path, 0, listeners); else