From 8329c8d7fd1447e09d494e859f7b5eeb790208f0 Mon Sep 17 00:00:00 2001
From: empathetic-alligator <willipovell@gmail.com>
Date: Tue, 16 Dec 2014 01:23:43 -0500
Subject: [PATCH] Made whitelisting user async.

---
 client.go | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/client.go b/client.go
index 107d81d..b780aa9 100644
--- a/client.go
+++ b/client.go
@@ -416,12 +416,14 @@ func (c *Client) handleShell(channel ssh.Channel) {
 					c.SysMsg("Missing $FINGERPRINT from: /whitelist $FINGERPRINT")
 				} else {
 					fingerprint := parts[1]
-					err = c.Server.Whitelist(fingerprint)
-					if err != nil {
-						c.SysMsg("Error adding to whitelist: %s", err)
-					} else {
-						c.SysMsg("Added %s to the whitelist", fingerprint)
-					}
+					go func() {
+						err = c.Server.Whitelist(fingerprint)
+						if err != nil {
+							c.SysMsg("Error adding to whitelist: %s", err)
+						} else {
+							c.SysMsg("Added %s to the whitelist", fingerprint)
+						}
+					}()
 				}
 
 			default: