From a0e5516dbc0f4e4a8e222f394ccfcb4a1e89a914 Mon Sep 17 00:00:00 2001 From: Matias Doyle Date: Thu, 9 Nov 2017 14:09:56 +0100 Subject: [PATCH] Send DETACH message before Closing connection --- unixgram.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unixgram.go b/unixgram.go index 4433a79..9995795 100644 --- a/unixgram.go +++ b/unixgram.go @@ -244,6 +244,10 @@ func (uc *unixgramConn) EventQueue() chan WPAEvent { } func (uc *unixgramConn) Close() error { + if err := uc.runCommand("DETACH"); err != nil { + return err + } + return uc.c.Close() }