2
0
mirror of https://github.com/soheilhy/cmux.git synced 2024-09-19 18:45:48 +08:00

Replace log.Fatal with log.Panic

This commit is contained in:
Soheil Hassas Yeganeh 2016-02-21 10:46:12 -05:00
parent 6c298ce7b1
commit ec462e9c0e
3 changed files with 5 additions and 5 deletions

View File

@ -31,7 +31,7 @@ func tlsListener(l net.Listener) net.Listener {
// Load certificates.
certificate, err := tls.LoadX509KeyPair("cert.pem", "key.pem")
if err != nil {
log.Fatal(err)
log.Panic(err)
}
config := &tls.Config{
@ -62,7 +62,7 @@ func Example_recursiveCmux() {
// Create the TCP listener.
l, err := net.Listen("tcp", "127.0.0.1:50051")
if err != nil {
log.Fatal(err)
log.Panic(err)
}
// Create a mux.

View File

@ -71,7 +71,7 @@ func serveGRPC(l net.Listener) {
func Example() {
l, err := net.Listen("tcp", "127.0.0.1:50051")
if err != nil {
log.Fatal(err)
log.Panic(err)
}
m := cmux.New(l)

View File

@ -28,7 +28,7 @@ func serveHTTPS(l net.Listener) {
// Load certificates.
certificate, err := tls.LoadX509KeyPair("cert.pem", "key.pem")
if err != nil {
log.Fatal(err)
log.Panic(err)
}
config := &tls.Config{
@ -48,7 +48,7 @@ func Example_bothHTTPAndHTTPS() {
// Create the TCP listener.
l, err := net.Listen("tcp", "127.0.0.1:50051")
if err != nil {
log.Fatal(err)
log.Panic(err)
}
// Create a mux.