Prevent NPE in network threads

Signed-off-by: Ross Allan <rallanpcl@gmail.com>