0XC0000237

Fix 0xC0000237 Graceful Disconnect Error Fast

The transport connection was gracefully closed. This usually means a network timeout or firewall killed the session. Here's how to fix it in 3 steps.

What's This Error Really About?

I know this error is infuriating — you're in the middle of something important, and bam, the connection drops with STATUS_GRACEFUL_DISCONNECT (0xC0000237). The transport connection was gracefully closed. That sounds polite, but it's a lie. It's your system saying something killed the session, like a firewall, a timeout, or a network hiccup.

I've seen this mostly on Windows 10 and 11 machines connecting to remote servers, VPNs, or RDP sessions. It also shows up on Windows Server 2022 when a client's connection just vanishes. The worst part? It's not always the same cause. But here's the good news: 90% of the time, it's one of three things. I'll walk you through them from quickest to most thorough.

The 30-Second Fix: Restart Network Hardware

Don't roll your eyes at me. This sounds too simple, but it works more often than you'd think. I've had users swear they already restarted their PC, only to find the modem had been running for 200 days. Network gear gets tired.

  1. Unplug your modem and router (if they're separate).
  2. Wait 30 seconds. Yes, count to 30. Not 10. The internal capacitors need to drain.
  3. Plug the modem back in first. Wait for all lights to stabilize — usually 1-2 minutes.
  4. Then plug the router back in. Wait again.
  5. Then restart your PC.

This clears out cached ARP tables and forces new DHCP leases. If your ISP had a brief outage that self-resolved, this resets the local state. I've fixed 0xC0000237 more times with this trick than with any registry edit.

Still seeing the error? Let's move to the moderate fix.

The 5-Minute Fix: Check Your Firewall and Antivirus

Firewalls love to drop connections gracefully. It's like they say, "I'm not blocking you, but you can't talk." That's the graceful disconnect. The error code doesn't tell you who closed the door — it could be Windows Defender, a third-party antivirus, or even your corporate firewall.

Step 1: Temporarily disable Windows Defender Firewall

  1. Open Control Panel > Windows Defender Firewall.
  2. Click Turn Windows Defender Firewall on or off on the left.
  3. Select Turn off Windows Defender Firewall (not recommended) for both private and public networks.
  4. Click OK. Test the connection. If it works, you've found the culprit.

If it works, don't leave the firewall off. Instead, add an exception for the program or port causing the issue. For RDP, that's port 3389. For a custom app, you'll need to find which ports it uses.

Step 2: Check your antivirus

Norton, McAfee, and even built-in Windows Security sometimes flag legitimate network traffic. Go into your antivirus settings and look for a "network protection" or "IDS" feature. Turn it off temporarily. If the error stops, add an exclusion for your application.

I helped a user last month who had Bitdefender causing 0xC0000237 on every RDP session. We added an exception for mstsc.exe, and the error never came back.

Firewall still not the issue? Time for the advanced fix.

The 15-Minute Fix: Registry Tweaks for TCP Keepalive

This error often happens because your connection times out silently. Servers and clients have a "keepalive" setting — if no data is sent for a while, the connection drops. Windows defaults are too long or too short depending on your scenario. We're going to fix that.

Warning: Editing the registry is risky. Back it up first. Go to File > Export in Registry Editor and save a copy.

Step 1: Open Registry Editor

Press Win + R, type regedit, and hit Enter. Navigate to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

Step 2: Create or modify KeepAliveTime

Look for a DWORD called KeepAliveTime. If it's not there, right-click in the right pane, select New > DWORD (32-bit) Value, and name it KeepAliveTime.

Double-click it. Set the base to Decimal. Enter 300000 (that's 5 minutes in milliseconds). This tells Windows to send a keepalive packet after 5 minutes of inactivity. Some servers expect every minute — if you're still getting errors, try 60000 (1 minute).

Step 3: Adjust KeepAliveInterval

Create or modify another DWORD called KeepAliveInterval. Set it to 1000 (1 second) in decimal. This controls how often Windows retries the keepalive packet if no response comes.

Step 4: Tweak TcpMaxDataRetransmissions

This one's a lifesaver for unreliable networks. Create a DWORD called TcpMaxDataRetransmissions. Set it to 5 (decimal). Windows will retry up to 5 times before giving up. The default is 3, but in some environments, that's not enough.

Step 5: Restart your PC

The registry changes only take effect after a reboot. Once you're back, test the connection. I've seen this fix persistent 0xC0000237 errors on RDP connections to servers in different time zones where long idle periods were common.

When None of This Works

If you're still stuck, it's probably something specific to your setup. Check these:

  • VPN client: Try disconnecting and reconnecting the VPN. Some VPNs have their own timeout settings that override Windows.
  • Corporate proxy: If you're behind a proxy, it might terminate idle connections aggressively. Talk to your IT team.
  • Server-side settings: The server you're connecting to (like a Windows Server or a remote app) might have its own idle timeout. Check settings on that machine.

I once spent two hours on a call with a user who kept getting this error. Turned out his ISP was using Carrier-Grade NAT and dropping UDP packets. We switched to a TCP-only VPN, and the error vanished. Sometimes the fix is outside your computer.

You can fix this. Start with the router restart, then the firewall, then the registry. One of them will work.

Related Errors in Network & Connectivity
0XC00D11C0 Fix NS_E_WMP_NETWORK_ERROR (0XC00D11C0) in Windows Media Player 0X00002594 DNS Error 0x00002594: Zone Needs Master IP Fix Error 809 Why Your VPN Drops Every 30 Minutes on Windows 10/11 0X000013C8 Cluster Network Already Offline (0X000013C8) – What Actually Works

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.