Tcp server with async read and write

Hi,

I want to create a tcp server dat recieves and transmit binary data. Ik want to be able to send data to the client even if the client does not send data. I have tried a test program with go routines for recieving and send data. When the client disconnect, everything works. When the server tries to disconnect the client it some times workes.

https://pastebin.com/raw/BjZWzLFq

Perry