Skip to content

Commit

Permalink
remove SO_REUSEPORT on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
saviorand committed Jan 17, 2025
1 parent 064d7f6 commit 9f74fb8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Once you have a Mojo project set up locally,

```toml
[dependencies]
lightbug_http = ">=0.1.8"
lightbug_http = ">=0.1.9"
```

3. Run `magic install` at the root of your project, where `mojoproject.toml` is located
Expand Down
5 changes: 1 addition & 4 deletions lightbug_http/net.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,11 @@ struct ListenConfig:
try:

@parameter
# REUSEADDR doesn't work on ubuntu.
# TODO: do we want to reuse port on linux? currently doesn't work
if os_is_macos():
socket.set_socket_option(SO_REUSEADDR, 1)
else:
socket.set_socket_option(SO_REUSEPORT, 1)
except e:
logger.warn("ListenConfig.listen: Failed to set socket as reusable", e)
# TODO: Maybe raise here if we want to make this a hard failure.

var bind_success = False
var bind_fail_logged = False
Expand Down
2 changes: 1 addition & 1 deletion mojoproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels = ["conda-forge", "https://conda.modular.com/max", "https://repo.prefix
description = "Simple and fast HTTP framework for Mojo!"
name = "lightbug_http"
platforms = ["osx-arm64", "linux-64"]
version = "0.1.8"
version = "0.1.9"

[tasks]
build = { cmd = "rattler-build build --recipe recipes -c https://conda.modular.com/max -c conda-forge --skip-existing=all", env = {MODULAR_MOJO_IMPORT_PATH = "$CONDA_PREFIX/lib/mojo"} }
Expand Down
2 changes: 1 addition & 1 deletion recipes/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ context:

package:
name: "lightbug_http"
version: 0.1.8
version: 0.1.9

source:
- path: ../lightbug_http
Expand Down

0 comments on commit 9f74fb8

Please sign in to comment.