equal
deleted
inserted
replaced
137 function method:send(...) |
137 function method:send(...) |
138 local msg = t_concat({...}, "\t"); |
138 local msg = t_concat({...}, "\t"); |
139 if msg:sub(-1) ~= "\n" then |
139 if msg:sub(-1) ~= "\n" then |
140 msg = msg .. "\n" |
140 msg = msg .. "\n" |
141 end |
141 end |
142 module:log("debug", "sending %q", msg:sub(1,-2)); |
142 -- module:log("debug", "sending %q", msg:sub(1,-2)); |
143 local ok, err = self.conn:send(msg); |
143 local ok, err = self.conn:send(msg); |
144 if not ok then |
144 if not ok then |
145 log("error", "Could not write to socket: %s", err); |
145 log("error", "Could not write to socket: %s", err); |
146 if err == "closed" then |
146 if err == "closed" then |
147 conn = nil; |
147 conn = nil; |