diff --git a/nbserverproxy/handlers.py b/nbserverproxy/handlers.py
index <HASH>..<HASH> 100644
--- a/nbserverproxy/handlers.py
+++ b/nbserverproxy/handlers.py
@@ -120,7 +120,7 @@ class LocalProxyHandler(WebSocketHandlerMixin, IPythonHandler):
         self.log.info('on_ping: {}'.format(data))
         self._record_activity()
         if hasattr(self, 'ws'):
-            self.ws.ping(data)
+            self.ws.protocol.write_ping(data)
 
     def on_pong(self, data):
         """
Use ws protocol's write_ping; ws has no ping().