@@ -58,7 +58,7 @@ def update_handler(self):
58
58
ip = MDS_IPs ["primary" ]["ip" ]
59
59
port = MDS_IPs ["primary" ]["port" ]
60
60
# print(s.gethostname())
61
- s .bind (('' , 9090 ))
61
+ # s.bind(('', 9090))
62
62
63
63
try :
64
64
s .connect ((ip , port ))
@@ -263,16 +263,18 @@ def _write(self, pg, pg_data):
263
263
_send_msg (s , data_msg )
264
264
print (len (pg .object_list ))
265
265
266
+ self .processing [pg .pg_id ] = pg_data
267
+ threading .Thread (target = self .update_handler ()).start ()
266
268
### Add server to receive response
267
269
osd_response = _wait_recv_msg (s , 1024 )
268
270
269
271
if osd_response ["status" ] == "RECEIVED" :
270
272
print ("file sent to OSD" )
271
- self .processing [pg .pg_id ] = pg_data
273
+ # self.processing[pg.pg_id] = pg_data
272
274
# if self.start_update_handler == False:
273
275
# self.start_update_handler = True
274
276
# self.update_handler()
275
- threading .Thread (target = self .update_handler ())
277
+ # threading.Thread(target=self.update_handler())
276
278
s .close ()
277
279
return 0
278
280
@@ -445,7 +447,7 @@ def logout(self):
445
447
msg = {"type" :"CLIENT_LOGOUT" , "username" :self .username }
446
448
447
449
s = socket .socket ()
448
- s .bind (('' , 9090 ))
450
+ # s.bind(('', 9090))
449
451
ip = MDS_IPs ["primary" ]["ip" ]
450
452
port = MDS_IPs ["primary" ]["port" ]
451
453
@@ -549,7 +551,7 @@ def login():
549
551
ip = MDS_IPs ["primary" ]["ip" ]
550
552
port = MDS_IPs ["primary" ]["port" ]
551
553
# print(s.gethostname())
552
- s .bind (('' , 9090 ))
554
+ # s.bind(('', 9090))
553
555
554
556
try :
555
557
s .connect ((ip , port ))
0 commit comments