Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor mlxserver mainLoop to avoid recursion #2

Open
RichardMorris opened this issue Feb 2, 2024 · 0 comments
Open

Refactor mlxserver mainLoop to avoid recursion #2

RichardMorris opened this issue Feb 2, 2024 · 0 comments

Comments

@RichardMorris
Copy link
Owner

The mainLoop code is

def mainLoop():
global client_sock, server_sock, channel, address
try:
while 1:
data = client_sock.recv(1024)
print "Request", data
readAndSendFrame()
except:
e = sys.exc_info()
print "Error"
print e
server_sock.close()
client_sock.close()
setupSocketServer()
listernSocket()
mainLoop()

It should be possible to put the whole try-except inside the while loop. Easy fix, but needs testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant