Skip to content

Commit

Permalink
Default SO_REUSEADDR=true for server socket
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Feb 18, 2023
1 parent ff78f6f commit 33ac347
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ object EpollAsyncServerSocketChannel {
case epoll: EventPollingExecutorScheduler =>
val fd = SocketHelpers.mkNonBlocking()
val ch = new EpollAsyncServerSocketChannel(fd)
ch.setOption(StandardSocketOptions.SO_REUSEADDR, java.lang.Boolean.TRUE)
ch.unmonitor = epoll.monitor(fd, reads = true, writes = false)(ch)
ch
case _ =>
Expand Down

0 comments on commit 33ac347

Please sign in to comment.