multiconn-client.py sometimes concatenates messages
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- python
- 領域
- networking
調査の方向性
materials/python-sockets-tutorial/multiconn-client.py と multiconn-server.py から始め、次に、サーバーを 127.0.0.1:65432 で実行した状態で、示されている 2 つのコマンドを使って問題を再現します。クライアントが 2 つのメッセージをどのように送受信し、サーバーがそれらをどのようにログに記録するかを追跡します;完了の条件は、2 回目の実行で 1 回目の実行と一致する形で各メッセージが個別に報告されることです。
索引モデルが issue の本文から書いたものです。
説明
@dbader, thanks very much for your example code.
Description of the bug
Running the multi-connection example from the python-sockets-tutorial, ie,
- materials/python-sockets-tutorial/multiconn-client.py
sometimes, but not always, concatenates the two messages.
To Reproduce
Start the server and view the output from when the client is run (see below)
python -u multiconn-server.py 127.0.0.1 65432
listening on ('127.0.0.1', 65432)
accepted connection from ('127.0.0.1', 50484)
echoing b'Message 1 from client.' to ('127.0.0.1', 50484)
echoing b'Message 2 from client.' to ('127.0.0.1', 50484)
closing connection to ('127.0.0.1', 50484)
accepted connection from ('127.0.0.1', 50486)
echoing b'Message 1 from client.Message 2 from client.' to ('127.0.0.1', 50486)
closing connection to ('127.0.0.1', 50486)
Run the client twice with 1 connection (see below). The first run gives expected results, the second run concatenates the two messages (as can be seen below). The concatenation is also evident in the output from multiconn-server.py above.
python -u multiconn-client.py 127.0.0.1 65432 1
starting connection 1 to ('127.0.0.1', 65432)
sending b'Message 1 from client.' to connection 1
sending b'Message 2 from client.' to connection 1
received b'Message 1 from client.' from connection 1
received b'Message 2 from client.' from connection 1
closing connection 1
python -u multiconn-client.py 127.0.0.1 65432 1
starting connection 1 to ('127.0.0.1', 65432)
sending b'Message 1 from client.' to connection 1
sending b'Message 2 from client.' to connection 1
received b'Message 1 from client.Message 2 from client.' from connection 1
closing connection 1
Expected behavior
The output form the second run of the multiconn-client.py should be identical to the output from the first run.
Desktop (please complete the following information):
- OS: CentOS 7
- Browser: Firefox
- Version 91.2.0esr (64-bit)
Additional context
Python 3.8.0
- 主要言語
- Jupyter Notebook
- スター
- 5.2k
- フォーク
- 5.3k
- 平均マージ
- 4日 10時間
- マージ済み PR(30日)
- 10
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
realpython/materials のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
realpython/materials#729 ·
-
п オープン
難易度 5/5 1週間以上 初心者へのやさしさ 1/100
realpython/materials#763 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 55/100
realpython/materials#738 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 45/100
realpython/materials#737 ·
-
проект2 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
realpython/materials#725 ·
realpython/materials の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
EleutherAI/lm-evaluation-harness#4201 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
possible bug Stage1
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
PrismarineJS/mineflayer#4147 ·
-
type/automation type/performance
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100