Skip to content

Commit

Permalink
Merge pull request #47 from nats-io/server-version-updates
Browse files Browse the repository at this point in the history
Update handling of keys from INFO line
  • Loading branch information
wallyqs authored Jul 11, 2018
2 parents daf3563 + 09a15c6 commit a76123a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion nats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
# limitations under the License.
#

__version__ = b'0.7.0'
__version__ = b'0.7.2'
__lang__ = b'python2'
2 changes: 1 addition & 1 deletion nats/io/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ def _process_connect_init(self):
self._max_payload_size = self._server_info["max_payload"]

# Check whether we need to upgrade to TLS first of all
if self._server_info['tls_required']:
if 'tls_required' in self._server_info and self._server_info['tls_required']:
# Detach and prepare for upgrading the TLS connection.
self._loop.remove_handler(self._socket.fileno())

Expand Down
2 changes: 1 addition & 1 deletion script/install_gnatsd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

export DEFAULT_NATS_SERVER_VERSION=v0.9.4
export DEFAULT_NATS_SERVER_VERSION=v1.2.0
export NATS_SERVER_VERSION="${NATS_SERVER_VERSION:=$DEFAULT_NATS_SERVER_VERSION}"

# check to see if gnatsd folder is empty
Expand Down
3 changes: 1 addition & 2 deletions tests/client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,8 @@ def test_parse_info(self):
self.assertIn("go", info_keys)
self.assertIn("host", info_keys)
self.assertIn("port", info_keys)
self.assertIn("auth_required", info_keys)
self.assertIn("tls_required", info_keys)
self.assertIn("max_payload", info_keys)
self.assertIn("client_id", info_keys)

@tornado.testing.gen_test(timeout=5)
def test_connect_fails(self):
Expand Down

0 comments on commit a76123a

Please sign in to comment.