Permalink
Browse files

minor changes to handle end of file

  • Loading branch information...
jmeehan16 committed Aug 28, 2014
1 parent 4bfd999 commit adbc7281d06a67e55bbf69f2d228d25f74760240
View
@@ -55,7 +55,10 @@ def s_popvotes(conn, lock):
print "Closing S-Store connection"
break
lock.acquire()
conn.sendall(votes[s_index])
if(s_index >= len(votes)):
conn.sendall(str(s_index) + " 2310050899 998")
else:
conn.sendall(votes[s_index])
s_index+=1
time.sleep(waittime)
lock.release()
@@ -72,7 +75,10 @@ def h_popvotes(conn, lock):
print "Closing H-Store connection"
break
lock.acquire()
conn.sendall(votes[h_index])
if(h_index >= len(votes)):
conn.sendall(str(h_index) + " 2310050899 998")
else:
conn.sendall(votes[h_index])
h_index+=1
time.sleep(waittime)
lock.release()
@@ -80,12 +80,12 @@ public VoterDemoSStoreClient(String args[]) {
// this.switchboard = new PhoneCallGenerator(VoterDemoSStoreConstants.VOTE_FILE);
this.switchboard = new PhoneCallGenerator();
//VoterDemoSStoreUtil.connectToHost();
// try {
// Thread.sleep(VoterDemoSStoreConstants.WAIT_TIME);
// } catch (InterruptedException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
try {
Thread.sleep(VoterDemoSStoreConstants.WAIT_TIME);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@Override

0 comments on commit adbc728

Please sign in to comment.