Diff

bosh.lua @ 411:db462d4feb44

verse: trim trailing whitespace
author Kim Alvefur <zash@zash.se>
date Tue, 18 Apr 2017 16:46:26 +0200
parent 262:f47afb171e6e
child 490:6b2f31da9610
line wrap: on
line diff
--- a/bosh.lua	Fri Apr 07 19:39:59 2017 +0200
+++ b/bosh.lua	Tue Apr 18 16:46:26 2017 +0200
@@ -64,7 +64,7 @@
 			self.inactive_since = nil;
 			return self:_handle_response(response, code, request);
 		end
-		
+
 		-- Connection issues, we need to retry this request
 		local time = os.time();
 		if not self.inactive_since then
@@ -72,10 +72,10 @@
 		elseif time - self.inactive_since > self.bosh_max_inactivity then
 			return self:_disconnected();
 		else
-			self:debug("%d seconds left to reconnect, retrying in %d seconds...", 
+			self:debug("%d seconds left to reconnect, retrying in %d seconds...",
 				self.bosh_max_inactivity - (time - self.inactive_since), reconnect_timeout);
 		end
-		
+
 		-- Set up reconnect timer
 		timer.add_task(reconnect_timeout, function ()
 			self:debug("Retrying request...");
@@ -103,7 +103,7 @@
 
 function stream_mt:_send_session_request()
 	local body = self:_make_body();
-	
+
 	-- XEP-0124
 	body.attr.hold = "1";
 	body.attr.wait = "60";
@@ -114,7 +114,7 @@
 	body.attr.from = self.jid;
 	body.attr.to = self.host;
 	body.attr.secure = 'true';
-	
+
 	http.request(self.bosh_url, { body = tostring(body) }, function (response, code)
 		if code == 0 then
 			-- Failed to connect