pleskac/blog — pull request #1 by colemickens (2013-11-27 21:50:42+00:00)
Title: Remove deadlock, make endpoint run in main goroutine.

The for{} doesn't allow for yielding back to the Go runtime scheduler, so it deadlocks. Removing the for{} without making other changes causes main() to fall through and exit (since endpoint() was being started in another goroutine). The other changes makes it so that is run in the main thread/goroutine instead.