Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
koehlma committed Dec 12, 2015
1 parent 2559b19 commit 1ad7a0c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/test_ping_pong.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ def on_connect(self, request, status):
request.stream.read_start(on_read=self.on_read)

def on_connection(self, stream, status):
self.assert_equal(status, uv.StatusCode.SUCCESS)
connection = stream.accept()
connection.read_start(on_read=self.on_read)
connection.write(b'PING')
try:
connection = stream.accept()
connection.read_start(on_read=self.on_read)
connection.write(b'PING')
except uv.UVError as error:
print(error)

def set_up(self):
self.buffer = []
Expand Down

0 comments on commit 1ad7a0c

Please sign in to comment.