Skip to content
Snippets Groups Projects
Commit c55d579e authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Remove TCP_NODELAY and debug deadlock

parent f32ca044
No related branches found
No related tags found
1 merge request!40Implements #89 PNG chunking
Pipeline #11608 passed
......@@ -85,8 +85,8 @@ static SOCKET tcpConnect(URI &uri) {
return INVALID_SOCKET;
}
int flags =1;
if (setsockopt(csocket, IPPROTO_TCP, TCP_NODELAY, (const char *)&flags, sizeof(flags))) { LOG(ERROR) << "ERROR: setsocketopt(), TCP_NODELAY"; };
//int flags =1;
//if (setsockopt(csocket, IPPROTO_TCP, TCP_NODELAY, (const char *)&flags, sizeof(flags))) { LOG(ERROR) << "ERROR: setsocketopt(), TCP_NODELAY"; };
addrinfo hints = {}, *addrs;
hints.ai_family = AF_INET;
......@@ -169,8 +169,8 @@ Peer::Peer(SOCKET s, Universe *u, Dispatcher *d) : sock_(s), can_reconnect_(fals
is_waiting_ = true;
scheme_ = ftl::URI::SCHEME_TCP;
int flags =1;
if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (const char *)&flags, sizeof(flags))) { LOG(ERROR) << "ERROR: setsocketopt(), TCP_NODELAY"; };
//int flags =1;
//if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (const char *)&flags, sizeof(flags))) { LOG(ERROR) << "ERROR: setsocketopt(), TCP_NODELAY"; };
// Send the initiating handshake if valid
if (status_ == kConnecting) {
......@@ -602,7 +602,9 @@ int Peer::_send() {
}
DWORD bytessent;
LOG(INFO) << "About to send: " << send_size;
int c = WSASend(sock_, wsabuf.data(), send_size, (LPDWORD)&bytessent, 0, NULL, NULL);
LOG(INFO) << "Fin send";
#else
int c = ftl::net::internal::writev(sock_, send_buf_.vector(), (int)send_buf_.vector_size());
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment