Software / code / prosody
Comparison
net/server_event.lua @ 10407:bd8fbee04a2f
server_event: Remove duplicated code (thanks waqas)
readcallback() calls onreadtimeout() and runs the exact same code if
onreadtimeout() doesn't return true, which it doesn't do.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 13 Nov 2019 22:34:25 +0100 |
| parent | 10234:d4390c427a66 |
| child | 10547:c77471c180ea |
comparison
equal
deleted
inserted
replaced
| 10406:a7903de619b0 | 10407:bd8fbee04a2f |
|---|---|
| 461 function interface_mt:ondisconnect() | 461 function interface_mt:ondisconnect() |
| 462 end | 462 end |
| 463 function interface_mt:ontimeout() | 463 function interface_mt:ontimeout() |
| 464 end | 464 end |
| 465 function interface_mt:onreadtimeout() | 465 function interface_mt:onreadtimeout() |
| 466 self.fatalerror = "timeout during receiving" | |
| 467 debug( "connection failed:", self.fatalerror ) | |
| 468 self:_close() | |
| 469 self.eventread = nil | |
| 470 end | 466 end |
| 471 function interface_mt:ondrain() | 467 function interface_mt:ondrain() |
| 472 end | 468 end |
| 473 function interface_mt:ondetach() | 469 function interface_mt:ondetach() |
| 474 end | 470 end |