Skip to content

Commit

Permalink
Set HOST=''; hard-coded foreman for tbuckley.com
Browse files Browse the repository at this point in the history
  • Loading branch information
tbuckley committed Apr 17, 2012
1 parent 43398d6 commit 134e271
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ec262.py
Expand Up @@ -80,6 +80,10 @@ def send_command(self, command, data=None):
self.push(command + "\n")

def found_terminator(self):
"""Process a received command
Should command have data, set next command
"""
if not self.mid_command:
command, data_length = self.buffer.split(":", 1)
if data_length:
Expand Down Expand Up @@ -115,7 +119,7 @@ def start_server(self, port=DEFAULT_PORT):
print "Starting server on %d" % port
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
self.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
self.bind(("127.0.0.1", port))
self.bind(("", port))
self.listen(1)
try:
asyncore.loop()
Expand Down Expand Up @@ -186,7 +190,7 @@ def __init__(self):
self.datasource = None

def run_job(self):
workers = [("tbuckley.com", 11123)]
workers = [("tbuckley.com", DEFAULT_PORT)]
for worker in workers:
sc = ServerChannel(worker, self)
asyncore.loop()
Expand Down

0 comments on commit 134e271

Please sign in to comment.