mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Merge pull request #575 from katterjohn/listener-socket-leak
(chibi net): make-listener-socket: close the socket on error
This commit is contained in:
commit
e2d43bceb8
1 changed files with 1 additions and 0 deletions
|
@ -90,6 +90,7 @@
|
||||||
((not sock)
|
((not sock)
|
||||||
(error "couldn't create socket for: " addrinfo))
|
(error "couldn't create socket for: " addrinfo))
|
||||||
((not (set-socket-option! sock level/socket socket-opt/reuseaddr 1))
|
((not (set-socket-option! sock level/socket socket-opt/reuseaddr 1))
|
||||||
|
(close-file-descriptor sock)
|
||||||
(error "couldn't set the socket to be reusable" addrinfo))
|
(error "couldn't set the socket to be reusable" addrinfo))
|
||||||
((not (bind sock
|
((not (bind sock
|
||||||
(address-info-address addrinfo)
|
(address-info-address addrinfo)
|
||||||
|
|
Loading…
Add table
Reference in a new issue