Skip to content

Commit c4a0fb6

Browse files
committed
manage duplicated name
1 parent efa07f8 commit c4a0fb6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ def run():
4545
continue
4646
message = parse(message_rcv[0])
4747
if message.type == 'MessageClientConnectResponse':
48+
if message.id == -1:
49+
print('your name is duplicated!!!')
50+
exit(-1)
4851
print('my id is ' + str(message.id))
4952
world.set_id(message.id, message.ground_config['goal_id'])
5053
break

0 commit comments

Comments
 (0)