summaryrefslogtreecommitdiff
path: root/sql/net_serv.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/net_serv.cc')
-rw-r--r--sql/net_serv.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index e5cb4d1e815..cad1f041005 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -227,6 +227,8 @@ int
my_net_write(NET *net,const char *packet,ulong len)
{
uchar buff[NET_HEADER_SIZE];
+ if (unlikely(!net->vio)) // nowhere to write
+ return 0;
/*
Big packets are handled by splitting them in packets of MAX_PACKET_LENGTH
length. The last packet is always a packet that is < MAX_PACKET_LENGTH.