This repository has been archived by the owner on Jul 8, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Close the connection on the server when the client closes it first
When the client closes the connection, the server will read EOF. In that case the connection should be closed on the server as well. Without this change the server goroutine will go into an infinite loop when the client closes the connection. It'll try to read, get an EOF, then "continue", go back to read, get another EOF and so on. That takes 100% CPU in this situation.
- Loading branch information