Mercurial > prosody-hg
comparison net/server_event.lua @ 9495:89e05b118f6e
net.server: Remove socket constructor fallback
Should no longer be needed
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 12 Oct 2018 16:24:49 +0200 |
| parents | 5fdda751333a |
| children | 36e379f058c8 |
comparison
equal
deleted
inserted
replaced
| 9494:b19f676203fd | 9495:89e05b118f6e |
|---|---|
| 735 typ = "tcp6"; | 735 typ = "tcp6"; |
| 736 elseif #n == 4 then | 736 elseif #n == 4 then |
| 737 typ = "tcp4"; | 737 typ = "tcp4"; |
| 738 end | 738 end |
| 739 end | 739 end |
| 740 local create = socket[typ] or socket.tcp; | 740 local create = socket[typ]; |
| 741 if type( create ) ~= "function" then | 741 if type( create ) ~= "function" then |
| 742 return nil, "invalid socket type" | 742 return nil, "invalid socket type" |
| 743 end | 743 end |
| 744 local client, err = create() -- creating new socket | 744 local client, err = create() -- creating new socket |
| 745 if not client then | 745 if not client then |
