Skip to content

rpc : set SO_REUSEADDR for the server socket#7320

Merged
rgerganov merged 1 commit intoggml-org:masterfrom
rgerganov:rpc-reuseaddr
May 17, 2024
Merged

rpc : set SO_REUSEADDR for the server socket#7320
rgerganov merged 1 commit intoggml-org:masterfrom
rgerganov:rpc-reuseaddr

Conversation

@rgerganov
Copy link
Copy Markdown
Member

ref: #7293

@rgerganov
Copy link
Copy Markdown
Member Author

This patch fixes the problem of not being able to restart rpc-server on the same port if it crashes.

This can be verified like this:

  1. start rpc-server -p 50052
  2. in some other console nc localhost 50052
  3. killall -9 rpc-server

If you try to start rpc-server again (without SO_REUSEADDR), it will fail. With this patch, it will start successfully.

@mofosyne mofosyne added server Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix labels May 16, 2024
@rgerganov rgerganov merged commit f4bd8b3 into ggml-org:master May 17, 2024
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
phuongncn pushed a commit to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4 that referenced this pull request Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants