Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix incomplete peer id generation

  • Loading branch information...
commit d269dafb883857a47846e2f2d768375679e39c2a 1 parent 8e22d54
Sanko Robinson authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/AnyEvent/BitTorrent.pm
6 lib/AnyEvent/BitTorrent.pm
View
@@ -90,9 +90,9 @@ has peerid => (
pack(
'a20',
(sprintf(
- '-AB%01d%02d%1s-%7s%-5s',
- ($AnyEvent::BitTorrent::VERSION =~ m[^v(\d+)\.(\d+)]),
- ($AnyEvent::BitTorrent::VERSION =~ m[\_] ? 'U' : 'S'),
+ '-AB%01d%01d%01d%1s-%7s%-5s',
+ ($AnyEvent::BitTorrent::VERSION =~ m[^v(\d+)\.(\d+)\.(\d+)]),
+ ($AnyEvent::BitTorrent::VERSION =~ m[[^\d\.^v]] ? 'U' : 'S'),
(join '',
map {
['A' .. 'Z', 'a' .. 'z', 0 .. 9, qw[- . _ ~]]
Please sign in to comment.
Something went wrong with that request. Please try again.