1
0
mirror of https://github.com/janet-lang/janet synced 2025-04-11 01:36:38 +00:00

Merge pull request #1577 from sogaiu/cleanup-unix-domain-socket

Remove unix domain socket after test
This commit is contained in:
Calvin Rose 2025-04-04 07:11:42 -05:00 committed by GitHub
commit 17524d2ed3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -501,8 +501,10 @@
# soreuseport on unix domain sockets
(compwhen (or (= :macos (os/which)) (= :linux (os/which)))
(assert-no-error "unix-domain socket reuseaddr"
(let [s (net/listen :unix "./unix-domain-socket" :stream)]
(:close s))))
(let [uds-path "./unix-domain-socket"]
(defer (os/rm uds-path)
(let [s (net/listen :unix uds-path :stream)]
(:close s))))))
# net/accept-loop level triggering
(gccollect)