Reverted changes to remot driver because some settings, e.g. highlight mode, stopped working.
This commit is contained in:
parent
0009d90a68
commit
ca0e3b5987
@ -45,28 +45,17 @@ class driver(remoteDriver):
|
|||||||
continue
|
continue
|
||||||
if self.fenrirSock in r:
|
if self.fenrirSock in r:
|
||||||
client_sock, client_addr = self.fenrirSock.accept()
|
client_sock, client_addr = self.fenrirSock.accept()
|
||||||
response = "ERROR: Failed to process command\n"
|
|
||||||
try:
|
try:
|
||||||
rawdata = client_sock.recv(8129)
|
rawdata = client_sock.recv(8129)
|
||||||
data = rawdata.decode("utf-8").rstrip().lstrip()
|
|
||||||
if data:
|
|
||||||
# Process the command and get response
|
|
||||||
result = self.env['runtime']['remoteManager'].handleRemoteIncommingWithResponse(data)
|
|
||||||
if result['success']:
|
|
||||||
response = f"OK: {result['message']}\n"
|
|
||||||
else:
|
|
||||||
response = f"ERROR: {result['message']}\n"
|
|
||||||
else:
|
|
||||||
response = "ERROR: Empty command\n"
|
|
||||||
except Exception as e:
|
|
||||||
response = f"ERROR: {str(e)}\n"
|
|
||||||
|
|
||||||
# Send response back to client
|
|
||||||
try:
|
|
||||||
client_sock.send(response.encode("utf-8"))
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
try:
|
||||||
|
data = rawdata.decode("utf-8").rstrip().lstrip()
|
||||||
|
eventQueue.put({"Type":fenrirEventType.RemoteIncomming,
|
||||||
|
"Data": data
|
||||||
|
})
|
||||||
|
except:
|
||||||
|
pass
|
||||||
try:
|
try:
|
||||||
client_sock.close()
|
client_sock.close()
|
||||||
except:
|
except:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user