Software / code / prosody
Comparison
net/server_select.lua @ 7041:aff786e7b4ce
net.server_select: Close all connections when quitting (and not just stepping), matches server_event
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sat, 02 Jan 2016 20:42:20 +0000 |
| parent | 6819:ffb2b5e31456 |
| child | 7042:20ac6972b9aa |
| child | 7043:14bc5593b97e |
comparison
equal
deleted
inserted
replaced
| 7040:bdcea2dd33b8 | 7041:aff786e7b4ce |
|---|---|
| 909 | 909 |
| 910 -- wait some time (0 by default) | 910 -- wait some time (0 by default) |
| 911 socket_sleep( _sleeptime ) | 911 socket_sleep( _sleeptime ) |
| 912 until quitting; | 912 until quitting; |
| 913 if once and quitting == "once" then quitting = nil; return; end | 913 if once and quitting == "once" then quitting = nil; return; end |
| 914 closeall(); | |
| 914 return "quitting" | 915 return "quitting" |
| 915 end | 916 end |
| 916 | 917 |
| 917 local function step() | 918 local function step() |
| 918 return loop(true); | 919 return loop(true); |