aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-07-26 16:46:18 +0100
committerMatthew Wild <mwild1@gmail.com>2012-07-26 16:46:18 +0100
commit38d35a1b685a67feaae2299a62562a7ef7e3c324 (patch)
treea37031ae1f2ed75b8a60e00be33a3708e8babe97 /net
parent779f3979229ac77c57ca14a4919c7f48d86371d4 (diff)
downloadprosody-38d35a1b685a67feaae2299a62562a7ef7e3c324.tar.gz
prosody-38d35a1b685a67feaae2299a62562a7ef7e3c324.zip
net.server_event: Replace usage of string.len() with # operator
Diffstat (limited to 'net')
-rw-r--r--net/server_event.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/server_event.lua b/net/server_event.lua
index 264d50a7..f2626f5f 100644
--- a/net/server_event.lua
+++ b/net/server_event.lua
@@ -115,7 +115,6 @@ do
local addevent = base.addevent
local coroutine_wrap, coroutine_yield = coroutine.wrap,coroutine.yield
- local string_len = string.len
-- Private methods
function interface_mt:_position(new_position)
@@ -310,7 +309,7 @@ do
if self.nowriting then return nil, "locked" end
--vdebug( "try to send data to client, id/data:", self.id, data )
data = tostring( data )
- local len = string_len( data )
+ local len = #data
local total = len + self.writebufferlen
if total > cfg.MAX_SEND_LENGTH then -- check buffer length
local err = "send buffer exceeded"