Skip to content

Commit

Permalink
use buffered channel
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Lehner <dev@der-flo.net>
  • Loading branch information
florianl committed Dec 2, 2023
1 parent 31ff94c commit d64791a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion goNetViz.go
Expand Up @@ -611,7 +611,7 @@ func createBytes(slice []int, bitsPerByte int) []byte {
func run(cfg configs) error {
g, ctx := errgroup.WithContext(context.Background())
ctx, cancel := context.WithCancel(ctx)
osSig := make(chan os.Signal)
osSig := make(chan os.Signal, 1)
signal.Notify(osSig, os.Interrupt)
defer func() {
signal.Stop(osSig)
Expand Down

0 comments on commit d64791a

Please sign in to comment.