Software / code / prosody-modules
Comparison
mod_statistics/prosodytop.lua @ 1085:56fc7a86eb20
mod_statistics: prosodytop: Fix off-by-one error (thanks Zash)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 17 Jun 2013 16:06:18 +0100 |
| parent | 1072:4dbdb1b465e8 |
| child | 1343:7dbde05b48a9 |
comparison
equal
deleted
inserted
replaced
| 1084:9612cea92503 | 1085:56fc7a86eb20 |
|---|---|
| 102 handle_line(line); | 102 handle_line(line); |
| 103 end | 103 end |
| 104 if lastpos == #data then | 104 if lastpos == #data then |
| 105 partial = nil; | 105 partial = nil; |
| 106 else | 106 else |
| 107 partial = data:sub(lastpos+1); | 107 partial = data:sub(lastpos); |
| 108 end | 108 end |
| 109 end | 109 end |
| 110 | 110 |
| 111 function stats_listener.ondisconnect(conn, err) | 111 function stats_listener.ondisconnect(conn, err) |
| 112 stdscr:mvaddstr(6, 0, "DISCONNECTED: "..(err or "unknown")); | 112 stdscr:mvaddstr(6, 0, "DISCONNECTED: "..(err or "unknown")); |