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.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 88a3bdbf3e6..0f38f846515 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -1126,7 +1126,8 @@ void my_net_set_read_timeout(NET *net, uint timeout)
DBUG_PRINT("enter", ("timeout: %d", timeout));
net->read_timeout= timeout;
#ifdef NO_ALARM
- vio_timeout(net->vio, 0, timeout);
+ if (net->vio)
+ vio_timeout(net->vio, 0, timeout);
#endif
DBUG_VOID_RETURN;
}
@@ -1138,7 +1139,8 @@ void my_net_set_write_timeout(NET *net, uint timeout)
DBUG_PRINT("enter", ("timeout: %d", timeout));
net->write_timeout= timeout;
#ifdef NO_ALARM
- vio_timeout(net->vio, 1, timeout);
+ if (net->vio)
+ vio_timeout(net->vio, 1, timeout);
#endif
DBUG_VOID_RETURN;
}