mirror of
https://github.com/Syncplay/syncplay
synced 2024-12-17 12:24:38 +00:00
Server should ignore showDebugMessage
This commit is contained in:
parent
1b3e370d6d
commit
f1fbd18068
@ -30,7 +30,7 @@ class JSONCommandProtocol(LineReceiver):
|
||||
if not line:
|
||||
return
|
||||
try:
|
||||
self._client.ui.showDebugMessage("client/server << {}".format(line))
|
||||
self.showDebugMessage("client/server << {}".format(line))
|
||||
messages = json.loads(line)
|
||||
except:
|
||||
self.dropWithError(getMessage("not-json-server-error").format(line))
|
||||
@ -40,7 +40,7 @@ class JSONCommandProtocol(LineReceiver):
|
||||
def sendMessage(self, dict_):
|
||||
line = json.dumps(dict_)
|
||||
self.sendLine(line)
|
||||
self._client.ui.showDebugMessage("client/server >> {}".format(line))
|
||||
self.showDebugMessage("client/server >> {}".format(line))
|
||||
|
||||
def drop(self):
|
||||
self.transport.loseConnection()
|
||||
@ -57,6 +57,9 @@ class SyncClientProtocol(JSONCommandProtocol):
|
||||
self.logged = False
|
||||
self._pingService = PingService()
|
||||
|
||||
def showDebugMessage(self, line):
|
||||
self._client.ui.showDebugMessage(line)
|
||||
|
||||
def connectionMade(self):
|
||||
self._client.initProtocol(self)
|
||||
self.sendHello()
|
||||
@ -243,6 +246,9 @@ class SyncServerProtocol(JSONCommandProtocol):
|
||||
return f(self, *args, **kwds)
|
||||
return wrapper
|
||||
|
||||
def showDebugMessage(self, line):
|
||||
pass
|
||||
|
||||
def dropWithError(self, error):
|
||||
print getMessage("client-drop-server-error").format(self.transport.getPeer().host, error)
|
||||
self.sendError(error)
|
||||
|
Loading…
Reference in New Issue
Block a user