lib/syslogstash/syslog_reader.rb in syslogstash-0.1.1 vs lib/syslogstash/syslog_reader.rb in syslogstash-0.1.2
- old
+ new
@@ -14,9 +14,13 @@
# continuing in a separate thread.
#
def run
debug { "#run called" }
+ if File.exists?(@file)
+ File.unlink(@file)
+ end
+
socket = Socket.new(Socket::AF_UNIX, Socket::SOCK_DGRAM, 0)
socket.bind(Socket.pack_sockaddr_un(@file))
@worker = Thread.new do
begin