Software /
code /
prosody
Comparison
net/server_event.lua @ 2478:7be72eca5666
net.server_{select,event}: Fail gracefully if socket doesn't have a setoption method (LuaSec issue I think)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 21 Jan 2010 12:56:08 +0000 |
parent | 2477:a08ba94c2a29 |
child | 2534:1f46a9d9b16a |
comparison
equal
deleted
inserted
replaced
2477:a08ba94c2a29 | 2478:7be72eca5666 |
---|---|
418 self.starttls = false; | 418 self.starttls = false; |
419 return true | 419 return true |
420 end | 420 end |
421 | 421 |
422 function interface_mt:setoption(option, value) | 422 function interface_mt:setoption(option, value) |
423 return self.conn:setoption(option, value); | 423 if self.conn.setoption then |
424 return self.conn:setoption(option, value); | |
425 end | |
426 return false, "setoption not implemented"; | |
424 end | 427 end |
425 | 428 |
426 -- Stub handlers | 429 -- Stub handlers |
427 function interface_mt:onconnect() | 430 function interface_mt:onconnect() |
428 end | 431 end |