mirror of
https://github.com/cmur2/dyndnsd.git
synced 2025-08-08 08:33:56 +02:00
dyndnsd: handle potential nil cases detected by sorbet
- including review suggestions from @jgraichen
This commit is contained in:
@@ -14,7 +14,7 @@ module Dyndnsd
|
||||
# @return [void]
|
||||
def update(db)
|
||||
Helper.span('updater_update') do |span|
|
||||
span.set_tag('dyndnsd.updater.name', self.class.name.split('::').last)
|
||||
span.set_tag('dyndnsd.updater.name', self.class.name&.split('::')&.last || 'None')
|
||||
|
||||
# write zone file in bind syntax
|
||||
File.open(@zone_file, 'w') { |f| f.write(@generator.generate(db)) }
|
||||
@@ -24,7 +24,7 @@ module Dyndnsd
|
||||
end
|
||||
|
||||
# detach so children don't become zombies
|
||||
Process.detach(pid)
|
||||
Process.detach(pid) if pid
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user