unix: fix handling error on UDP socket creation

Thanks @ibc for the report and helping with testing :-)

/cc @indutny