Software /
code /
prosody
Comparison
net/server_epoll.lua @ 7586:846fdbbc62ba
net.server_epoll: Return something as FD when no connection exists
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 18 Aug 2016 16:00:51 +0200 |
parent | 7585:b64218c816de |
child | 7587:ff81a34bffb0 |
comparison
equal
deleted
inserted
replaced
7585:b64218c816de | 7586:846fdbbc62ba |
---|---|
139 end | 139 end |
140 return err; | 140 return err; |
141 end | 141 end |
142 | 142 |
143 function interface:getfd() | 143 function interface:getfd() |
144 return self.conn:getfd(); | 144 if self.conn then |
145 return self.conn:getfd(); | |
146 end | |
147 return -1; | |
145 end | 148 end |
146 | 149 |
147 function interface:ip() | 150 function interface:ip() |
148 return self.peername or self.sockname; | 151 return self.peername or self.sockname; |
149 end | 152 end |