diff options
Diffstat (limited to 'samples/forward.lua')
| -rw-r--r-- | samples/forward.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/samples/forward.lua b/samples/forward.lua index ff65b84..e51c5ce 100644 --- a/samples/forward.lua +++ b/samples/forward.lua | |||
| @@ -76,13 +76,13 @@ function connect(who, host, port) | |||
| 76 | if not ret and err == "timeout" then | 76 | if not ret and err == "timeout" then |
| 77 | wait(who, "output") | 77 | wait(who, "output") |
| 78 | ret, err = who:connect(host, port) | 78 | ret, err = who:connect(host, port) |
| 79 | if not ret and err ~= "already connected" then | ||
| 80 | kick(who) | ||
| 81 | kick(context[who].peer) | ||
| 82 | return | ||
| 83 | end | ||
| 79 | end | 84 | end |
| 80 | if not ret then | 85 | return forward(who) |
| 81 | kick(who) | ||
| 82 | kick(context[who].peer) | ||
| 83 | else | ||
| 84 | return forward(who) | ||
| 85 | end | ||
| 86 | end | 86 | end |
| 87 | 87 | ||
| 88 | -- gets rid of a client | 88 | -- gets rid of a client |
