Skip to content

Commit

Permalink
Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
crnicholson committed Dec 3, 2024
1 parent 14252bb commit 112ad65
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Code/groundStation/uploader/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def flask_thread():

# Main WebSocket server coroutine.
async def websocket():
print(f"Starting server on ws://0.0.0.0:{WEBSOCKET_PORT}")
print(f"Starting server on ws://127.0.0.1:{WEBSOCKET_PORT}")
async with websockets.serve(handle_connection, "localhost", WEBSOCKET_PORT):
await asyncio.Future() # Run forever.

Expand All @@ -387,11 +387,9 @@ def start_websocket_server():
loop.run_until_complete(websocket())




if __name__ == "__main__":
# Start WebSocket server in a separate thread
threading.Thread(target=start_websocket_server).start()

# Start Flask server in the main thread
app.run(debug=False, port=HTTP_PORT, use_reloader=False)
app.run(debug=True, port=HTTP_PORT, use_reloader=False)

0 comments on commit 112ad65

Please sign in to comment.