Changeset 17664 for gsdl/trunk
- Timestamp:
- 2008-10-31T19:01:20+13:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/downloaders/WgetDownload.pm
r17549 r17664 188 188 } 189 189 190 # Returns true if the wget status needs to be monitored through sockets 191 # (if a socket is used to communicate with the Java program on when to 192 # terminate wget). True if we are running gli, or if the particular type 193 # of WgetDownload is *not* OAIDownload (in that case, the original way of 194 # terminating the perl script from Java terminated wget as well). 195 sub dealingWithSockets() { 196 my ($self) = @_; 197 return (defined $self->{'gli'} && $self->{'gli'} && !defined $port && ref($self) ne "OAIDownload"); 198 # use ref($self) to find the classname of an object 199 } 200 190 201 sub useWget 191 202 { … … 209 220 # Instead, when wget has to be terminated in the middle of execution, GLI will 210 221 # connect to a serverSocket here to communicate when it's time to stop wget. 211 if( defined $self->{'gli'} && $self->{'gli'} && !defined $port) {222 if($self->dealingWithSockets()) { 212 223 213 224 $port = <STDIN>; # gets a port on localhost that's not yet in use … … 336 347 # Instead, when wget has to be terminated in the middle of execution, GLI will 337 348 # connect to a serverSocket here to communicate when it's time to stop wget. 338 if( defined $self->{'gli'} && $self->{'gli'} && !defined $port) {349 if($self->dealingWithSockets()) { 339 350 340 351 $port = <STDIN>; # gets a port on localhost that's not yet in use
Note:
See TracChangeset
for help on using the changeset viewer.