diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 5f7d9e6b45bf..9437f1386f2f 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -4666,7 +4666,7 @@ pref("network.tcp.keepalive.retry_interval", 1); // seconds pref("network.tcp.keepalive.probe_count", 4); #endif -pref("network.tcp.tcp_fastopen_enable", false); +pref("network.tcp.tcp_fastopen_enable", true); pref("network.tcp.tcp_fastopen_consecutive_failure_limit", 5); // Whether to disable acceleration for all widgets. diff --git a/netwerk/base/TCPFastOpenLayer.cpp b/netwerk/base/TCPFastOpenLayer.cpp index 44b7122a2f52..5013a4d6691f 100644 --- a/netwerk/base/TCPFastOpenLayer.cpp +++ b/netwerk/base/TCPFastOpenLayer.cpp @@ -378,8 +378,8 @@ TCPFastOpenFinish(PRFileDesc *fd, PRErrorCode &err, // If sendto is not implemented it points to _PR_InvalidInt, therefore we // check if sendto != _PR_InvalidInt. _PR_InvalidInt is exposed so we use // reserved_fn_0 which also points to _PR_InvalidInt. - if (!secret->mFirstPacketBufLen || - (tfoFd->lower->methods->sendto == (PRSendtoFN)tfoFd->lower->methods->reserved_fn_0)) { +// if (!secret->mFirstPacketBufLen || +// (tfoFd->lower->methods->sendto == (PRSendtoFN)tfoFd->lower->methods->reserved_fn_0)) { // Because of the way our nsHttpTransaction dispatch work, it can happened // that data has not been written into the socket. // In this case we can just call connect. @@ -396,7 +396,7 @@ TCPFastOpenFinish(PRFileDesc *fd, PRErrorCode &err, SOCKET_LOG(("TCPFastOpenFinish - sendto not implemented.\n")); fastOpenNotSupported = true; } - } else { +/* } else { // We have some data ready in the buffer we will send it with the syn // packet. PRInt32 rv = (tfoFd->lower->methods->sendto)(tfoFd->lower, @@ -437,6 +437,7 @@ TCPFastOpenFinish(PRFileDesc *fd, PRErrorCode &err, } } } +*/ if (result == PR_IN_PROGRESS_ERROR) { secret->mState = TCPFastOpenSecret::WAITING_FOR_CONNECTCONTINUE;