diff --git a/docs/changelog.rst b/docs/changelog.rst index 908a59a2..c73c5a44 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,6 +4,15 @@ Changelog This changelog is used to track all major changes to Mopidy. +v0.19.1 (UNRELEASED) +==================== + +**Dependencies** + +- Mopidy now requires Tornado >= 2.3, instead of >= 3.1. This should make + Mopidy continue to work on Debian/Raspbian stable, where Tornado 2.3 is the + newest version available. + v0.19.0 (2014-07-21) ==================== diff --git a/mopidy/http/handlers.py b/mopidy/http/handlers.py index 048c9ddf..03a97940 100644 --- a/mopidy/http/handlers.py +++ b/mopidy/http/handlers.py @@ -2,6 +2,7 @@ from __future__ import unicode_literals import logging import os +import socket import tornado.escape import tornado.web @@ -76,7 +77,12 @@ class WebSocketHandler(tornado.websocket.WebSocketHandler): self.jsonrpc = make_jsonrpc_wrapper(core) def open(self): - self.set_nodelay(True) + if hasattr(self, 'set_nodelay'): + # New in Tornado 3.1 + self.set_nodelay(True) + else: + self.handler.connection.socket.setsockopt( + socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) self.clients.add(self) logger.debug( 'New WebSocket connection from %s', self.request.remote_ip) diff --git a/setup.py b/setup.py index 3f69591d..900fcf38 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ setup( install_requires=[ 'setuptools', 'Pykka >= 1.1', - 'tornado >= 3.1', + 'tornado >= 2.3', ], extras_require={'http': []}, test_suite='nose.collector',