Changeset 17725 for trunk/Nebulous/lib
- Timestamp:
- May 16, 2008, 1:37:54 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous/lib/Nebulous/Client.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/lib/Nebulous/Client.pm
r17693 r17725 1 1 # Copyright (c) 2004-2008 Joshua Hoblitt 2 2 # 3 # $Id: Client.pm,v 1. 49 2008-05-15 03:26:11jhoblitt Exp $3 # $Id: Client.pm,v 1.50 2008-05-16 23:37:54 jhoblitt Exp $ 4 4 5 5 package Nebulous::Client; … … 171 171 $log->debug( "URI is: $uri" ); 172 172 173 # XXX this is a attempt to work around some sort of nasty NFS bug where 174 # occasionally stat()/open() on a file on an NFS mounted filesystem will 175 # fail EVEN THOU THE FILE ACTUALLY EXISTS. 176 # 177 # The instance file attempting to be opened should always exist as it was 178 # created by the Nebulous server. 173 179 my $fh; 174 eval { 175 $fh = _open_uri( $uri, '+<' ); 176 }; 180 for (my $i = 0; $i < 10; $i++) { 181 eval { 182 $fh = _open_uri( $uri, '+<' ); 183 }; 184 if ($@ =~ qr/file doesn't exist/) { 185 $log->set_err($@); 186 sleep 1; 187 } else { 188 last; 189 } 190 } 177 191 $log->logdie( $@ ) if $@; 178 192
Note:
See TracChangeset
for help on using the changeset viewer.
