… | |
… | |
188 | |
188 | |
189 | $self->{time} = $::NOW; |
189 | $self->{time} = $::NOW; |
190 | |
190 | |
191 | weaken ($Coro::current->{conn} = $self); |
191 | weaken ($Coro::current->{conn} = $self); |
192 | |
192 | |
193 | $::conns++; |
193 | ++$::conns; |
194 | $::maxconns = $::conns if $::conns > $::maxconns; |
194 | $::maxconns = $::conns if $::conns > $::maxconns; |
195 | |
195 | |
196 | $self |
196 | $self |
197 | } |
197 | } |
198 | |
198 | |
199 | sub DESTROY { |
199 | sub DESTROY { |
200 | #my $self = shift; |
200 | my $self = shift; |
|
|
201 | |
201 | close $self->{fh}; # workaround |
202 | close $self->{fh}; # workaround |
202 | --$::conns; |
203 | --$::conns; |
203 | } |
204 | } |
204 | |
205 | |
205 | sub prune_cache { |
206 | sub prune_cache { |