Skip to content

Commit

Permalink
Disable Nagle's Algorithm. Fixes #921
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrainger committed Jan 5, 2021
1 parent b458e4d commit 2371b61
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/MySqlConnector/Core/ServerSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,7 @@ private async Task<bool> OpenTcpSocketAsync(ConnectionSettings cs, ILoadBalancer
HostName = hostName;
m_tcpClient = tcpClient;
m_socket = m_tcpClient.Client;
m_socket.NoDelay = true;
m_stream = m_tcpClient.GetStream();
m_socket.SetKeepAlive(cs.Keepalive);
lock (m_lock)
Expand Down

0 comments on commit 2371b61

Please sign in to comment.