dd3c6ab

Bowmap · bowmap.git · Tickets

Branches > main > dd3c6ab > files

Move server backlog to a default option

Grahp, 2026-09-10

Commit: dd3c6abfb2c3916d597f74a39d6504bbf679a6e2
Parent: 8125dd8

1 changed file:

src/net/bowmap/server/network/socket.clj modified (view file)

@@ -5,17 +5,12 @@   (:import    [java.net ServerSocket])) -(def max-server-backlog-  "The maximum number of incoming connections that may be enqueued on the server-   until the connection is refused."-  50)- (defn server-socket   "Starts a server socket at the supplied port and optional bind address.    Returns a channel of connections that is coupled to the server's lifecycle."-  [& {:keys! [port] :keys [bind-addr]}]-  (let [server-socket (ServerSocket. port max-server-backlog bind-addr)-        connection-chan (chan max-server-backlog)]+  [& {:keys! [port] :keys [bind-addr backlog] :or {:backlog 50}}]+  (let [server-socket (ServerSocket. port backlog bind-addr)+        connection-chan (chan backlog)]     (io-thread       (try         (loop []