Skip to content

Commit

Permalink
check on_error method exists on handler before calling
Browse files Browse the repository at this point in the history
  • Loading branch information
lian committed Nov 6, 2015
1 parent aa2e9e1 commit dfa5bb3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/bitcoin/protocol/parser.rb
Expand Up @@ -176,6 +176,7 @@ def handle_stream_error(type, msg)

def parse_error *err
@stats['total_errors'] += 1
return unless @h.respond_to?(:on_error)
@h.on_error *err
end

Expand Down

0 comments on commit dfa5bb3

Please sign in to comment.