graceful-stop

command
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 4 Imported by: 0

README

graceful-stop

step

go run main.go

cd client

go run client.go normal

after 10s go run client.go refused

result

if main.go call srv.Stop(false): After 10 seconds, server side receives log listener closed, old client connections remain but new client are refused.

if main.go call srv.Stop(true):

After 10 seconds, server side receives log listener closed, all exited old client connections will be stopped by force, new client connection will be refused.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL