No need for splitting init and start of MpdSession
This commit is contained in:
parent
6d1bac0d72
commit
939a8f40d6
@ -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."""
|
||||
|
||||
@ -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):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user