Read stops reading if it needs to block. https://play.golang.org/p/TwtGzzBEnXV
On Fri, Mar 9, 2018 at 8:44 AM, <pierspowlesl...@gmail.com> wrote: > Hi all > > I've written a simple program which simply sends a message across a tcp > connection and back again. > > For some reason when I make the buffer larger than a certain size the > program deadlocks. > > When run on the playground with datalen set to 10000 the program deadlocks > but with datalen set to 1000 it functions fine. On my local machine it > deadlocks with datalen set to 1e7 but is fine with datalen set to 1e6. > > The program in question is here https://play.golang.org/p/q7QWA4Uz-3H > > Please could someone shed some light onto this, I'm literally going nuts ;) > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.