From db19975834a20ae94e53bebfa251a1ef47b8cbbd Mon Sep 17 00:00:00 2001 From: Sattar Salambayev Date: Wed, 1 Jul 2020 13:43:40 +0600 Subject: [PATCH] fix: args for cleanup --- server.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server.go b/server.go index 68c7294..96f7dad 100644 --- a/server.go +++ b/server.go @@ -89,7 +89,7 @@ func (srv *server) Start() error { //} <-srv.close - srv.cleanup(srv.unbindQsAtStop, srv.unbindExAtStop) + srv.cleanup() return nil } @@ -310,15 +310,15 @@ func (srv *server) Endpoint(endpoint string, handler Handler) error { return nil } -func (srv *server) cleanup(unbindQs, unbindEx bool) error { - if unbindQs { +func (srv *server) cleanup() error { + if srv.unbindQsAtStop { srv.sess.log.Info("started cleanup server rec channels") if err := srv.cleanupRec(); err != nil { return err } } - if unbindEx { + if srv.unbindExAtStop { srv.sess.log.Info("started cleanup server sen channels") if err := srv.cleanupSen(); err != nil { return err