Skip to content

Commit

Permalink
Fix ping / pong default message (#3308)
Browse files Browse the repository at this point in the history
  • Loading branch information
abcdmitry authored and asvetlov committed Oct 1, 2018
1 parent 508adbb commit e9b7da2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES/3308.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix default message for server ping and pong frames.
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Denis Matiychuk
Dima Veselov
Dimitar Dimitrov
Dmitry Doroshev
Dmitry Lukashin
Dmitry Shamov
Dmitry Trofimov
Dmytro Kuznetsov
Expand Down
4 changes: 2 additions & 2 deletions aiohttp/web_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ def compress(self):
def exception(self):
return self._exception

async def ping(self, message='b'):
async def ping(self, message=b''):
if self._writer is None:
raise RuntimeError('Call .prepare() first')
await self._writer.ping(message)

async def pong(self, message='b'):
async def pong(self, message=b''):
# unsolicited pong
if self._writer is None:
raise RuntimeError('Call .prepare() first')
Expand Down

0 comments on commit e9b7da2

Please sign in to comment.