lib/tracebin/reporter.rb in tracebin-0.0.8 vs lib/tracebin/reporter.rb in tracebin-0.0.9

- old
+ new

@@ -60,19 +60,19 @@ logger.debug "TRACEBIN: Server responded with a status code of #{res.code}." res rescue Exception => e logger.warn "TRACEBIN: Exception occurred sending data to the server: #{e.message}" - self.stop! + Tracebin::Agent.stop! end def handle_response(res, payload) case res when Net::HTTPSuccess logger.info 'TRACEBIN: Successfully sent payload to the server.' when Net::HTTPBadRequest logger.warn 'TRACEBIN: App bin ID not found. Please create a new app bin and add it to the config.' - self.stop! + Tracebin::Agent.stop! else logger.warn 'TRACEBIN: Failed to send data to the server. Will try again in 1 minute.' @storage.add_payload payload end end