Skip to content

Instantly share code, notes, and snippets.

View gyuho's full-sized avatar
🎯
Focusing

Gyuho Lee gyuho

🎯
Focusing
View GitHub Profile
@gyuho
gyuho / stale_tcp.go
Created January 24, 2018 19:08 — forked from yudai/stale_tcp.go
Reproducer for stale tcp sessions
package main
// Build and run as root since this code uses iptables to emulate a network outage.
// Make sure rules in iptables are cleared:
// sudo iptables -D INPUT -j DROP -p tcp --destination-port 2379; sudo iptables -D INPUT -j DROP -p tcp --source-port 2379
import (
"context"
"log"