Skip to content

Fix server terminating after first connection #2

Description

@anujbolewar

server.py calls sock.accept() exactly once globally. When the client disconnects or you hit 'q', the server script just dies. It doesn't loop back to listen for the next payload.

The Fix:

Put sock.accept() inside a while True: loop.
When shell() returns or errors out, explicitly call target.close().
Let the loop spin back around to block on the next accept().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions