Skip to content

Commit

Permalink
to simulate the error case
Browse files Browse the repository at this point in the history
  • Loading branch information
joaocarvoli committed Jul 11, 2022
1 parent 82142b5 commit ef27e70
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/Udp.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import json
import time
import HandlingExceptions as He
from socket import *
from Communication import Communication
Expand Down Expand Up @@ -33,5 +34,9 @@
else:
messageObject = cache_response

cm.send_response(messageObject.deserialize())
# To simulate the error case that there is no response to the client
if(messageObject.get_request_id() % 2) == 0:
cm.send_response(messageObject.deserialize())
else:
time.sleep(10)

0 comments on commit ef27e70

Please sign in to comment.