Mercurial > prosody-modules
comparison mod_component_client/mod_component_client.lua @ 1216:81a3bf8aba90
mod_component_client: Use the net.server connection abstraction for sending whitespace keep-alive, and not the raw socket (fixes a traceback which lead to an infinite timer loop in libevent)
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Mon, 28 Oct 2013 11:55:59 -0400 |
| parents | a234ad611633 |
| children | 4c4536481be1 |
comparison
equal
deleted
inserted
replaced
| 1215:1b55d8f86644 | 1216:81a3bf8aba90 |
|---|---|
| 238 if not ok and err ~= "timeout" then | 238 if not ok and err ~= "timeout" then |
| 239 return nil, err; | 239 return nil, err; |
| 240 end | 240 end |
| 241 | 241 |
| 242 local handler , conn = server.wrapclient ( conn , server_host , server_port , listener , "*l") | 242 local handler , conn = server.wrapclient ( conn , server_host , server_port , listener , "*l") |
| 243 __conn = conn; | 243 __conn = handler; |
| 244 ------------------------ | 244 ------------------------ |
| 245 return true; | 245 return true; |
| 246 end | 246 end |
| 247 local s, err = connect(); | 247 local s, err = connect(); |
| 248 if not s then | 248 if not s then |
