girl 0.94.0 → 0.95.0

This diff has not been reviewed by any users.
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: e4fbf6e091f1c0c19865e86a349ed046284ca1f807a171cd8f91b19066de3e28
4
- data.tar.gz: cb9077f3870ba5cfc2ed17bf66f9c97767d94d882836acf757d5b6addcc4860a
3
+ metadata.gz: 995e842429be7063ce5e29248927b336029f2e4dc864e4855979770d18ff7766
4
+ data.tar.gz: 83b4619a2b8cf5f99058282345478eee57a2b7638cefafa5a15d1d0170abfb96
5
5
  SHA512:
6
- metadata.gz: 4bcb135b88eb5fd4d06f7b7cbeb063553a380efa8c3359c0420b69c2b5481a873ea5632333c8dd56899112d86fb1a11697fa8befc734a168cb2d03ef9eb5b2b2
7
- data.tar.gz: '07935ef257d9301b18a9e1b4ed943ac0499ca4b502434b27aebebcfb8fcbe3f7a576fc9e5e7a16e9ed37ab9cf75eb490b1802dcad7024dd33f7db1a32ae11d37'
6
+ metadata.gz: 349a7012c29fd90bae97816b1af481d25623f580969f3ec354c0b747c43aea805bba0b02f8ebb8e653427b12fa5af07584fc3566ddb67bd48fd04947b4386fcf
7
+ data.tar.gz: c078531bb08ed0568e28170336c2a10b8b22896b2138bfdc149d9f61758cae938816ea623f7b4e7bab89e48620c855c731c4c3fdb2485573f2706125e9602b7c
@@ -785,11 +785,11 @@ module Girl
785
785
  def set_dst_closing( dst )
786
786
  return if dst.closed?
787
787
  dst_info = @dst_infos[ dst ]
788
+ dst_info[ :closing ] = true
788
789
 
789
790
  if dst_info[ :closed_write ] then
790
- close_read_dst( dst )
791
+ add_read( dst )
791
792
  else
792
- dst_info[ :closing ] = true
793
793
  @reads.delete( dst )
794
794
  add_write( dst )
795
795
  end
@@ -813,14 +813,13 @@ module Girl
813
813
  #
814
814
  def set_src_closing( src )
815
815
  return if src.closed?
816
-
817
816
  src_info = @src_infos[ src ]
817
+ src_info[ :closing ] = true
818
818
 
819
819
  if src_info[ :closed_write ] then
820
- close_read_src( src )
820
+ add_read( src )
821
821
  else
822
822
  @reads.delete( src )
823
- src_info[ :closing ] = true
824
823
  add_write( src )
825
824
  end
826
825
  end
@@ -1029,6 +1028,13 @@ module Girl
1029
1028
  end
1030
1029
 
1031
1030
  src_info = @src_infos[ src ]
1031
+
1032
+ # 处理关闭
1033
+ if src_info[ :closing ] then
1034
+ close_src( src )
1035
+ return
1036
+ end
1037
+
1032
1038
  proxy_type = src_info[ :proxy_type ]
1033
1039
 
1034
1040
  case proxy_type
@@ -1227,6 +1233,13 @@ module Girl
1227
1233
  end
1228
1234
 
1229
1235
  dst_info = @dst_infos[ dst ]
1236
+
1237
+ # 处理关闭
1238
+ if dst_info[ :closing ] then
1239
+ close_dst( dst )
1240
+ return
1241
+ end
1242
+
1230
1243
  src = dst_info[ :src ]
1231
1244
  add_src_wbuff( src, data )
1232
1245
  end
@@ -211,7 +211,7 @@ module Girl
211
211
  close_sock( streamd )
212
212
  streamd_info = @streamd_infos.delete( streamd )
213
213
  dst = streamd_info[ :dst ]
214
-
214
+
215
215
  if dst then
216
216
  close_read_dst( dst )
217
217
  set_dst_closing_write( dst )
@@ -543,13 +543,12 @@ module Girl
543
543
  #
544
544
  def set_dst_closing( dst )
545
545
  return if dst.closed?
546
-
547
546
  dst_info = @dst_infos[ dst ]
547
+ dst_info[ :closing ] = true
548
548
 
549
549
  if dst_info[ :closed_write ] then
550
- close_read_dst( dst )
550
+ add_read( dst )
551
551
  else
552
- dst_info[ :closing ] = true
553
552
  @reads.delete( dst )
554
553
  add_write( dst )
555
554
  end
@@ -574,11 +573,11 @@ module Girl
574
573
  def set_streamd_closing( streamd )
575
574
  return if streamd.closed?
576
575
  streamd_info = @streamd_infos[ streamd ]
576
+ streamd_info[ :closing ] = true
577
577
 
578
578
  if streamd_info[ :closed_write ] then
579
- close_read_streamd( streamd )
579
+ add_read( streamd )
580
580
  else
581
- streamd_info[ :closing ] = true
582
581
  @reads.delete( streamd )
583
582
  add_write( streamd )
584
583
  end
@@ -811,6 +810,13 @@ module Girl
811
810
  end
812
811
 
813
812
  dst_info = @dst_infos[ dst ]
813
+
814
+ # 处理关闭
815
+ if dst_info[ :closing ] then
816
+ close_dst( dst )
817
+ return
818
+ end
819
+
814
820
  @traff_ins[ dst_info[ :im ] ] += data.bytesize
815
821
  streamd = dst_info[ :streamd ]
816
822
 
@@ -858,6 +864,13 @@ module Girl
858
864
  end
859
865
 
860
866
  streamd_info = @streamd_infos[ streamd ]
867
+
868
+ # 处理关闭
869
+ if streamd_info[ :closing ] then
870
+ close_streamd( streamd )
871
+ return
872
+ end
873
+
861
874
  @traff_ins[ streamd_info[ :im ] ] += data.bytesize
862
875
  dst = streamd_info[ :dst ]
863
876
 
@@ -1,3 +1,3 @@
1
1
  module Girl
2
- VERSION = '0.94.0'.freeze
2
+ VERSION = '0.95.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: girl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.94.0
4
+ version: 0.95.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - takafan