intel / zephyr.js

JavaScript* Runtime for Zephyr* OS
Other
180 stars 64 forks source link

[tcp] Cannot send data to peer(-9) error occurs in TCPServer #1600

Closed qiaojingx closed 6 years ago

qiaojingx commented 7 years ago

Description

When sending single data pack by command echo "hello" | nc 192.0.2.1 4242 to TCPEchoServ4.js, tcpserver will prints error (Cannot send data to peer(-9)) sometimes.

Test Code

TCPEchoServ4.js; TCPEchoServ4_DHCP.js;

Steps to Reproduction

  1. make JS=samples/TCPEchoServ4.js FORCE=zjs_net_l2_enc28j60.json ROM=256
  2. make dfu
  3. Connect A101+Ethernet board to PC via Ethernet cable.
  4. add router and address on Linux ip route add 192.0.2.0 dev <ethX> ip addr add 192.0.2.2 dev <ethX>
  5. send single data pack by net-tools: echo "hello" | nc 192.0.2.1 4242

Actual Result

TCP4: selection_002

Expected Result

Message should keep the same. like: selection_002

Test Builds

Branch Commit Id Target Device Test Date Result
master 1d5a99d Arduino101 Oct 18, 2017 Fail

Additional Information

qiaojingx commented 6 years ago

Verified with commit 1b970c8. This issue is not reproduced on Arduino101. A similar issue is found on K64F and qemu. Tracking by #1713 . Close this one.