Skip to content

Commit

Permalink
revert to 1024 as default size
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyBen committed Sep 23, 2018
1 parent c87bd7d commit 6bcbd54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/remote_syslog_logger/udp_sender.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def initialize(remote_hostname, remote_port, options = {})
@remote_hostname = remote_hostname
@remote_port = remote_port
@whinyerrors = options[:whinyerrors]
@maxsize = options[:maxsize] || 30720
@max_size = options[:max_size]

@socket = UDPSocket.new
@packet = SyslogProtocol::Packet.new
Expand All @@ -27,7 +27,7 @@ def transmit(message)
next if line =~ /^\s*$/
packet = @packet.dup
packet.content = line
payload = packet.assemble @maxsize
payload = @max_size ? packet.assemble(@max_size) : packet.assemble
@socket.send(payload, 0, @remote_hostname, @remote_port)
rescue
$stderr.puts "#{self.class} error: #{$!.class}: #{$!}\nOriginal message: #{line}"
Expand Down

0 comments on commit 6bcbd54

Please sign in to comment.