No need for splitting init and start of MpdSession

This commit is contained in:
Stein Magnus Jodal 2011-06-04 17:18:46 +02:00
parent 6d1bac0d72
commit 939a8f40d6
2 changed files with 1 additions and 4 deletions

View File

@ -60,7 +60,7 @@ class MpdServer(asyncore.dispatcher):
(client_socket, client_socket_address) = self.accept()
logger.info(u'MPD client connection from [%s]:%s',
client_socket_address[0], client_socket_address[1])
MpdSession(self, client_socket, client_socket_address).start()
MpdSession(self, client_socket, client_socket_address)
def handle_close(self):
"""Handle end of client connection."""

View File

@ -23,9 +23,6 @@ class MpdSession(asynchat.async_chat):
self.authenticated = False
self.set_terminator(LINE_TERMINATOR.encode(ENCODING))
self.dispatcher = MpdDispatcher(session=self)
def start(self):
"""Called by asynchat when a new client connects."""
self.send_response([u'OK MPD %s' % VERSION])
def collect_incoming_data(self, data):