p2p2 0.21.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57e288ebc806c2661f7fa5314a9be3fa16bbb1dc2deac96cfce9f3ca65c97bea
4
- data.tar.gz: e7872fc331f68d07aaf16b02ea95fd3cdcc09f122acc4b16a51eeb49c5cac854
3
+ metadata.gz: ed5928f54a6129f64cc843748d5f337d9f5fdccfed90239b9a594bf6ecd577bc
4
+ data.tar.gz: 1ec20b3e82bf69b5e371ceb89dcc666b97f0a2407072647271e481c7a3166e4e
5
5
  SHA512:
6
- metadata.gz: 665ea51b965d27fdd38fabcdbab4ab7932a9cad6ca70d4503a4c452597979eee6598706b4f8d15670a188742a14375805cb8f9eb2e919c7c48bc8917f2a3a0b4
7
- data.tar.gz: 7263370934487b9e3937931cbefb13feedce4b14c30fb3c25f6c3119f41fe9d878e4b18a70cbb733267bcc95b6ba39abe097a4bcb1cf35b474cad04dd1379a92
6
+ metadata.gz: 2b35b3bc6a54ceb236aee2f9258580c381397619dcdfbe4dfd3ea61c8c6deeda1e6e188a64b6921794d801fd2838f5db3c7e00462be3cebfe5158e589356a8ff
7
+ data.tar.gz: 9bd26990e4e3aff5285a10b011c322251ba3c64f5379e02172d70f16d9624355c8a9ec3f194b108c3681b966b38749d4bded464a9c9588bf3aca4e7645026e3f
@@ -539,6 +539,10 @@ module P2p2
539
539
  tund.sendmsg( data, 0, to_addr )
540
540
  rescue IO::WaitWritable, Errno::EINTR
541
541
  return
542
+ rescue Errno::EHOSTUNREACH, Errno::ENETUNREACH => e
543
+ puts "#{ Time.new } #{ e.class }, close tund"
544
+ close_tund( tund )
545
+ return
542
546
  end
543
547
 
544
548
  @tund_info[ :ctlmsgs ].shift
@@ -557,6 +561,10 @@ module P2p2
557
561
  tund.sendmsg( data, 0, @tund_info[ :tun_addr ] )
558
562
  rescue IO::WaitWritable, Errno::EINTR
559
563
  return
564
+ rescue Errno::EHOSTUNREACH, Errno::ENETUNREACH => e
565
+ puts "#{ Time.new } #{ e.class }, close tund"
566
+ close_tund( tund )
567
+ return
560
568
  end
561
569
  end
562
570
  end
@@ -625,6 +633,10 @@ module P2p2
625
633
  tund.sendmsg( data, 0, @tund_info[ :tun_addr ] )
626
634
  rescue IO::WaitWritable, Errno::EINTR
627
635
  return
636
+ rescue Errno::EHOSTUNREACH, Errno::ENETUNREACH => e
637
+ puts "#{ Time.new } #{ e.class }, close tund"
638
+ close_tund( tund )
639
+ return
628
640
  end
629
641
 
630
642
  # puts "debug2 written pack #{ pack_id }"
@@ -565,6 +565,10 @@ module P2p2
565
565
  tun.sendmsg( data, 0, to_addr )
566
566
  rescue IO::WaitWritable, Errno::EINTR
567
567
  return
568
+ rescue Errno::EHOSTUNREACH, Errno::ENETUNREACH => e
569
+ puts "#{ Time.new } #{ e.class }, close tun"
570
+ close_tun( tun )
571
+ return
568
572
  end
569
573
 
570
574
  @tun_info[ :ctlmsgs ].shift
@@ -583,6 +587,10 @@ module P2p2
583
587
  tun.sendmsg( data, 0, @tun_info[ :tund_addr ] )
584
588
  rescue IO::WaitWritable, Errno::EINTR
585
589
  return
590
+ rescue Errno::EHOSTUNREACH, Errno::ENETUNREACH => e
591
+ puts "#{ Time.new } #{ e.class }, close tun"
592
+ close_tun( tun )
593
+ return
586
594
  end
587
595
  end
588
596
  end
@@ -651,6 +659,10 @@ module P2p2
651
659
  tun.sendmsg( data, 0, @tun_info[ :tund_addr ] )
652
660
  rescue IO::WaitWritable, Errno::EINTR
653
661
  return
662
+ rescue Errno::EHOSTUNREACH, Errno::ENETUNREACH => e
663
+ puts "#{ Time.new } #{ e.class }, close tun"
664
+ close_tun( tun )
665
+ return
654
666
  end
655
667
 
656
668
  # puts "debug2 written pack #{ pack_id }"
@@ -1,3 +1,3 @@
1
1
  module P2p2
2
- VERSION = '0.21.0'.freeze
2
+ VERSION = '0.22.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: p2p2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - takafan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-03 00:00:00.000000000 Z
11
+ date: 2020-07-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 内网里的任意应用,访问另一个内网里的应用服务端。
14
14
  email: