#1932 Add SO_REUSEPORT and SO_REUSEADDR support.

Reporter Ivan
Owner Nobody
Created
Updated
Stars ★★ (2)
Tags
  • Type-Enhancement
  • Status-New
  • Priority-Medium
  1. Ivan on

    Description of feature: Add SO_REUSEPORT and SO_REUSEADDR support. luasosket already support it: sock:setoption("reuseaddr", true) sock:setoption("reuseport", true) Motivation: (Why?) I have nginx that listen: 0.0.0.0:5280, [::]:5280 0.0.0.0:5281, [::]:5281 and prosody that listen: 127.0.0.1:5280, [::1]:5280 127.0.0.1:5281, [::1]:5281 If nginx starts before prosody - than prosody fails to bind ports. If prosody starts first - all works as expected. sock:setoption("reuseport", true) - should allow prosody to bind port.

New comment

Not published. Used for spam prevention and optional update notifications.