Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

[net] Throw out an error before the server responds #1187

Open
cuiyanx opened this issue May 22, 2017 · 5 comments
Open

[net] Throw out an error before the server responds #1187

cuiyanx opened this issue May 22, 2017 · 5 comments
Assignees
Labels

Comments

@cuiyanx
Copy link
Contributor

cuiyanx commented May 22, 2017

Description

I test socket.connect function as client and find socket connection throw out error so fast, the server hasn't had time to respond yet. So, the socket connection will be failed when first connecting.

Test Code

/samples/TCPClient6.js

Steps to Reproduction

Actual Result

If first connecting, socket connection will be failed.

Expected Result

Socket connection wait respondent from server until time out, and throw out error.

Test Builds

Branch Commit Id Target Device Test Date Result
master 82ef9f8 Arduino 101 May 22, 2017 Fail

Additional Information

@grgustaf
Copy link
Contributor

I cannot seem to reproduce this problem. I tested after applying my patch from #1474.

@grgustaf grgustaf added the fixed label Aug 16, 2017
@qiaojingx
Copy link

Verified with commit 06cce05. It won't go into function if in error since error name is not NotFoundError. So this issue will not reproduce. But if modify NotFoundError to Error, still can see this issue.
selection_138

@grgustaf grgustaf removed the fixed label Aug 29, 2017
@grgustaf
Copy link
Contributor

OK, I finally see what you mean. First, to help reproduce this in the future, I needed to patch tests/tools/tests-tcp6-server.py to use port 4242 which TCPClient6.js is expected. Then start that on your host, and boot up this system.

The problem is that the first time it shows the "Server not found" message instead of working; it's only on retry that it starts working.

Now that I fully understand the issue we can lower the priority and don't need to fix this for 0.4.

@qiaojingx
Copy link

Verified with commit b32969f on Arduino101, FRDM-K64F and Qemu.
This issue is reproduced contiunously on Arduino101 over Ethernet. But on FRDM-K64F and Qemu, it occurs alternately.

@grgustaf grgustaf self-assigned this Jan 8, 2018
@grgustaf
Copy link
Contributor

grgustaf commented Feb 5, 2018

Try to reserve the word Verified for when the fix works and the problem is solved. Here you Tested it but it still wasn't fixed.

@grgustaf grgustaf removed this from the 0.5 milestone Feb 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants