diff --git a/lib/puppet/provider/sensu_handler/json.rb b/lib/puppet/provider/sensu_handler/json.rb index 76bc9a2d1b..710e8d5901 100644 --- a/lib/puppet/provider/sensu_handler/json.rb +++ b/lib/puppet/provider/sensu_handler/json.rb @@ -72,6 +72,9 @@ def socket def socket=(value) @conf['handlers'][resource[:name]]['socket'] = value + if @conf['handlers'][resource[:name]]['socket'].has_key?('port') + @conf['handlers'][resource[:name]]['socket']['port'] = @conf['handlers'][resource[:name]]['socket']['port'].to_i + end end def handlers