mirror of https://github.com/m-labs/artiq.git
sync_struct: Tweak variable name to avoid confusion with `init` mod action [nfc]
This commit is contained in:
parent
90c144a685
commit
bd71852427
|
@ -19,7 +19,7 @@ from artiq.protocols import pyon
|
||||||
from artiq.protocols.asyncio_server import AsyncioServer
|
from artiq.protocols.asyncio_server import AsyncioServer
|
||||||
|
|
||||||
|
|
||||||
_init_string = b"ARTIQ sync_struct\n"
|
_protocol_banner = b"ARTIQ sync_struct\n"
|
||||||
|
|
||||||
|
|
||||||
def process_mod(target, mod):
|
def process_mod(target, mod):
|
||||||
|
@ -71,7 +71,7 @@ class Subscriber:
|
||||||
try:
|
try:
|
||||||
if before_receive_cb is not None:
|
if before_receive_cb is not None:
|
||||||
before_receive_cb()
|
before_receive_cb()
|
||||||
self.writer.write(_init_string)
|
self.writer.write(_protocol_banner)
|
||||||
self.writer.write((self.notifier_name + "\n").encode())
|
self.writer.write((self.notifier_name + "\n").encode())
|
||||||
self.receive_task = asyncio.ensure_future(self._receive_cr())
|
self.receive_task = asyncio.ensure_future(self._receive_cr())
|
||||||
except:
|
except:
|
||||||
|
@ -217,7 +217,7 @@ class Publisher(AsyncioServer):
|
||||||
async def _handle_connection_cr(self, reader, writer):
|
async def _handle_connection_cr(self, reader, writer):
|
||||||
try:
|
try:
|
||||||
line = await reader.readline()
|
line = await reader.readline()
|
||||||
if line != _init_string:
|
if line != _protocol_banner:
|
||||||
return
|
return
|
||||||
|
|
||||||
line = await reader.readline()
|
line = await reader.readline()
|
||||||
|
|
Loading…
Reference in New Issue