Exit on SIGINT and SIGTERM.

This commit is contained in:
Mikkel Krautz 2011-05-17 22:25:56 +02:00
parent fbf81bafe0
commit 1e164668e5

View file

@ -7,6 +7,7 @@ package main
import ( import (
"fmt" "fmt"
"log" "log"
"os"
"os/signal" "os/signal"
"path/filepath" "path/filepath"
) )
@ -25,5 +26,7 @@ func SignalHandler() {
} }
log.Printf("Server %v frozen", sid) log.Printf("Server %v frozen", sid)
} }
os.Exit(0)
} }
} }