Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIME_WAIT sockets fixes #1838

Merged
merged 4 commits into from
Mar 17, 2017
Merged

TIME_WAIT sockets fixes #1838

merged 4 commits into from
Mar 17, 2017

Conversation

djphoenix
Copy link
Contributor

Fixes #1836 (at most)

@@ -130,7 +130,7 @@ u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb)ICACHE_FLASH_ATTR;
#define TCP_OOSEQ_TIMEOUT 6U /* x RTO */

#ifndef TCP_MSL
#define TCP_MSL 60000UL /* The maximum segment lifetime in milliseconds */
#define TCP_MSL 5000UL /* The maximum segment lifetime in milliseconds */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe leave a comment there indicating why this was changed so next time lwIP is updated it shows up in the diff. Can even include a reference to the GitHub issue number. If we don't document such changes there's a real risk that subsequent SDK updates will revert them w/o us noticing.

@@ -1455,7 +1455,7 @@
* SO_REUSE==1: Enable SO_REUSEADDR option.
*/
#ifndef SO_REUSE
#define SO_REUSE 0
#define SO_REUSE 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dito

@marcelstoer marcelstoer added this to the 2.0.0-follow-up milestone Mar 7, 2017
@djphoenix
Copy link
Contributor Author

@marcelstoer updated

@devyte
Copy link

devyte commented Mar 7, 2017 via email

@djphoenix
Copy link
Contributor Author

@devyte Agree for tcp_impl.h file change, moved it into lwipopts.h

@djphoenix djphoenix mentioned this pull request Mar 8, 2017
3 tasks
@djphoenix
Copy link
Contributor Author

Objections here?

@marcelstoer
Copy link
Member

marcelstoer commented Mar 16, 2017

No, but since only 2/3 of #1836 are completed I thought you had planned to add more commits to this PR. I now understand you want to create a separate PR at a later point for the 3rd issue, right?

@djphoenix
Copy link
Contributor Author

Yep, I think this PR is huge step forward, and I haven't meet Lua GC anyway. So I will try to work on it some later (if nobody finished it earlier). But now these small changes gives big improvements, so I vote for land it as-is.

@devsaurus devsaurus merged commit 2f00c1d into nodemcu:dev Mar 17, 2017
@djphoenix djphoenix deleted the net-fix branch March 17, 2017 11:34
eiselekd pushed a commit to eiselekd/nodemcu-firmware that referenced this pull request Jan 7, 2018
* Enable SO_REUSEADDR for server TCP sockets

* Reduce TCP_MSL to 5 sec

* Add changes notice for future updates

* Move MSL change to lwipiots.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants