Software /
code /
prosody
Comparison
net/server_event.lua @ 6859:88a997e08b70
server_event: Put function keyword on same line as the coroutine.wrap it's being passed to
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 25 Sep 2015 17:55:06 +0200 |
parent | 6858:d8f8c0b2fda8 |
child | 6860:153a2e49c4f7 |
comparison
equal
deleted
inserted
replaced
6858:d8f8c0b2fda8 | 6859:88a997e08b70 |
---|---|
155 self:_close() | 155 self:_close() |
156 debug( "fatal error while ssl wrapping:", err ) | 156 debug( "fatal error while ssl wrapping:", err ) |
157 return false | 157 return false |
158 end | 158 end |
159 self.conn:settimeout( 0 ) -- set non blocking | 159 self.conn:settimeout( 0 ) -- set non blocking |
160 local handshakecallback = coroutine_wrap( | 160 local handshakecallback = coroutine_wrap(function( event ) |
161 function( event ) | |
162 local _, err | 161 local _, err |
163 local attempt = 0 | 162 local attempt = 0 |
164 local maxattempt = cfg.MAX_HANDSHAKE_ATTEMPTS | 163 local maxattempt = cfg.MAX_HANDSHAKE_ATTEMPTS |
165 while attempt < maxattempt do -- no endless loop | 164 while attempt < maxattempt do -- no endless loop |
166 attempt = attempt + 1 | 165 attempt = attempt + 1 |