(self)
| 61 | # http://code.activestate.com/recipes/425210-simple-stoppable-server-using-socket-timeout/ |
| 62 | class StoppableHTTPServer(socketserver.TCPServer): |
| 63 | def server_bind(self): |
| 64 | # Can't use HTTPServer due to reliance on socket.getfqdn() which seems to be bugged. |
| 65 | # See https://github.com/pyfa-org/Pyfa/issues/1560#issuecomment-390095101 |
| 66 | socketserver.TCPServer.server_bind(self) |
| 67 | host, port = self.server_address[:2] |
| 68 | self.server_name = host |
| 69 | self.server_port = port |
| 70 | |
| 71 | # self.settings = CRESTSettings.getInstance() |
| 72 | |
| 73 | self.socket.settimeout(1) |
| 74 | self.run = True |
| 75 | |
| 76 | def get_request(self): |
| 77 | while self.run: |
nothing calls this directly
no outgoing calls
no test coverage detected