From 1c286de85861edf1608cc68bf059bbbad803a59e Mon Sep 17 00:00:00 2001
From: Fernando Erd <fce15@inf.ufpr.br>
Date: Tue, 8 Nov 2016 16:37:40 -0200
Subject: [PATCH] arrumado erro, talvez

---
 Chat.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Chat.py b/Chat.py
index d8b741e..b2a0c3c 100755
--- a/Chat.py
+++ b/Chat.py
@@ -45,6 +45,7 @@ SEND_PORT = 3131        # Porta que o Servidor envia
 RECV_PORT = 3131       # Porta que o Servidor recebe
 
 class Protocol():
+
     def __init__ (self):
         self.marca = "~" #Marca
         self.type = str(1) #Alterar Depois
@@ -123,13 +124,13 @@ def token ():
     dest = (HOST, SEND_PORT)
     while True:
 	EndTime = time.time()
-        if (EndTime - StartTime >= 10  and TOKEN == 1):
+        if (EndTime - StartTime >= 2  and TOKEN == 1):
             print 'MANDEI O TOKEN'
             TOKEN = 0
             tokenMessage.type = str(0)
             msg = tokenMessage.getEmpacotar()
             udp.sendto (msg,dest)
-            time.sleep(2)
+            #time.sleep(2)
         if (TOKEN == 1):
             #print 'ESTOU COM O TOKEN'
             if (not queue.empty()):
@@ -154,7 +155,7 @@ def client ():
             protocolMessage.setDestiny()
             protocolMessage.setPriority()
             protocolMessage.setMessage()
-            protocolMessage.Type = str(1)
+            protocolMessage.type = str(1)
             protocolMessage.setSizeof()
             protocolMessage.setCRC32()
             msg = protocolMessage.getEmpacotar()
-- 
GitLab