Fix race condition in GoListenAndServe() for passive sockets (#49)
Fix race condition in GoListenAndServe() for passive sockets (#49)

Before this change sometimes GoListenAndServe() could return before
the go routine it contains had been scheduled.  This meant the
socket.lock would not be held and hence waitForOpenSocket() would
return with a nil error even when the connection wasn't valid yet.

Moving the taking of the lock into GoListenAndServe rather than the
goroutine fixes the problem
goftp/server