formatting, and handle dropped connections by returning from goroutine