Skip to content

Fix Close bugs

Christopher Schinnerl requested to merge std-logger into master

Created by: VoidingWarranties

There were a few bugs pertaining to module closing that are fixed in this PR:

  • module Close methods would return immediately on error instead of finishing cleanup
  • not all modules were Closed on API shutdown
  • the gateway did not disconnect from its peers on shutdown

and a few improvements:

  • module Close errors are returned from Server.Close instead of Server.Serve
  • Server.Close waits for Server.Serve to terminate before terminating itself. This ensures the server is completely shutdown when Server.Close is done.

Also, the gateway now uses persist.Logger instead of log.Logger to be consistent with other modules.

Closes #1015 (closed)

Merge request reports