Remove print
This commit is contained in:
parent
a7bc9fc358
commit
7cf0495f37
|
@ -44,7 +44,6 @@ class SwarmConn(INetConn):
|
||||||
async def _handle_new_streams(self) -> None:
|
async def _handle_new_streams(self) -> None:
|
||||||
# TODO: Break the loop when anything wrong in the connection.
|
# TODO: Break the loop when anything wrong in the connection.
|
||||||
while True:
|
while True:
|
||||||
print("!@# SwarmConn._handle_new_streams")
|
|
||||||
stream = await self.conn.accept_stream()
|
stream = await self.conn.accept_stream()
|
||||||
# Asynchronously handle the accepted stream, to avoid blocking the next stream.
|
# Asynchronously handle the accepted stream, to avoid blocking the next stream.
|
||||||
await self.run_task(self._handle_muxed_stream(stream))
|
await self.run_task(self._handle_muxed_stream(stream))
|
||||||
|
@ -57,7 +56,6 @@ class SwarmConn(INetConn):
|
||||||
await self.run_task(self.swarm.common_stream_handler(net_stream))
|
await self.run_task(self.swarm.common_stream_handler(net_stream))
|
||||||
|
|
||||||
async def _add_stream(self, muxed_stream: IMuxedStream) -> NetStream:
|
async def _add_stream(self, muxed_stream: IMuxedStream) -> NetStream:
|
||||||
print("!@# SwarmConn._add_stream:", muxed_stream)
|
|
||||||
net_stream = NetStream(muxed_stream)
|
net_stream = NetStream(muxed_stream)
|
||||||
# Call notifiers since event occurred
|
# Call notifiers since event occurred
|
||||||
for notifee in self.swarm.notifees:
|
for notifee in self.swarm.notifees:
|
||||||
|
@ -65,7 +63,6 @@ class SwarmConn(INetConn):
|
||||||
return net_stream
|
return net_stream
|
||||||
|
|
||||||
async def start(self) -> None:
|
async def start(self) -> None:
|
||||||
print("!@# SwarmConn.start")
|
|
||||||
await self.run_task(self._handle_new_streams())
|
await self.run_task(self._handle_new_streams())
|
||||||
|
|
||||||
async def run_task(self, coro: Awaitable[Any]) -> None:
|
async def run_task(self, coro: Awaitable[Any]) -> None:
|
||||||
|
|
|
@ -145,10 +145,8 @@ class Swarm(INetwork):
|
||||||
protocol_ids,
|
protocol_ids,
|
||||||
)
|
)
|
||||||
|
|
||||||
print(f"!@# swarm.new_stream: 0")
|
|
||||||
swarm_conn = await self.dial_peer(peer_id)
|
swarm_conn = await self.dial_peer(peer_id)
|
||||||
|
|
||||||
print(f"!@# swarm.new_stream: 1")
|
|
||||||
net_stream = await swarm_conn.new_stream()
|
net_stream = await swarm_conn.new_stream()
|
||||||
logger.debug("successfully opened a stream to peer %s", peer_id)
|
logger.debug("successfully opened a stream to peer %s", peer_id)
|
||||||
return net_stream
|
return net_stream
|
||||||
|
|
|
@ -97,7 +97,6 @@ class Mplex(IMuxedConn):
|
||||||
stream = MplexStream(name, stream_id, self)
|
stream = MplexStream(name, stream_id, self)
|
||||||
async with self.streams_lock:
|
async with self.streams_lock:
|
||||||
self.streams[stream_id] = stream
|
self.streams[stream_id] = stream
|
||||||
print(f"!@# _initialize_stream: stream_id={stream_id}, name={name}")
|
|
||||||
return stream
|
return stream
|
||||||
|
|
||||||
async def open_stream(self) -> IMuxedStream:
|
async def open_stream(self) -> IMuxedStream:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user