Permalink
Browse files

io.sockets: When we throw an error upon failing to resolve a host, re…

…port the host name.
  • Loading branch information...
erg committed Jan 12, 2019
1 parent 053dadd commit c3569f02fa9d086bb3eae903f63aed101e8d3dd8
Showing with 4 additions and 4 deletions.
  1. +4 −4 basis/io/sockets/sockets.factor
@@ -218,7 +218,7 @@ M: inet6 present

M: inet6 protocol drop 0 ;

ERROR: addrinfo-error n string ;
ERROR: addrinfo-error n string host ;

<PRIVATE

@@ -398,10 +398,10 @@ M: inet present

C: <inet> inet

M: string resolve-host
f prepare-addrinfo f void* <ref> [
M:: string resolve-host ( host -- seq )
host f prepare-addrinfo f void* <ref> [
getaddrinfo [
dup addrinfo-error-string addrinfo-error
dup addrinfo-error-string host addrinfo-error
] unless-zero
] keep void* deref addrinfo memory>struct
[ parse-addrinfo-list ] keep freeaddrinfo ;

0 comments on commit c3569f0

Please sign in to comment.