Mercurial > prosody-hg
comparison net/server.lua @ 1533:8c13be7aa9f0
net.server: Don't close handler if it is already nil when SSL handshake fails
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 12 Jul 2009 14:29:42 +0100 |
| parents | 569d58d21612 |
| children | 0afc8ae01515 |
comparison
equal
deleted
inserted
replaced
| 1527:47729fa90a6c | 1533:8c13be7aa9f0 |
|---|---|
| 528 --coroutine_yield( handler, nil, err ) -- handshake not finished | 528 --coroutine_yield( handler, nil, err ) -- handshake not finished |
| 529 coroutine_yield( ) | 529 coroutine_yield( ) |
| 530 end | 530 end |
| 531 end | 531 end |
| 532 disconnect( handler, "ssl handshake failed" ) | 532 disconnect( handler, "ssl handshake failed" ) |
| 533 handler.close( true ) -- forced disconnect | 533 _ = handler and handler.close( true ) -- forced disconnect |
| 534 return false -- handshake failed | 534 return false -- handshake failed |
| 535 end | 535 end |
| 536 ) | 536 ) |
| 537 if startssl then -- ssl now? | 537 if startssl then -- ssl now? |
| 538 --out_put("server.lua: ", "starting ssl handshake") | 538 --out_put("server.lua: ", "starting ssl handshake") |
