We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d2b269 commit 5fb461aCopy full SHA for 5fb461a
src/viewer/svutil.cpp
@@ -401,8 +401,10 @@ SVNetwork::SVNetwork(const char* hostname, int port) {
401
stream_ = socket(addr_info->ai_family, addr_info->ai_socktype,
402
addr_info->ai_protocol);
403
404
- // If server is not there, we will start a new server as local child process.
405
- if (connect(stream_, addr_info->ai_addr, addr_info->ai_addrlen) < 0) {
+ if (stream_ < 0) {
+ std::cerr << "Failed to open socket" << std::endl;
406
+ } else if (connect(stream_, addr_info->ai_addr, addr_info->ai_addrlen) < 0) {
407
+ // If server is not there, we will start a new server as local child process.
408
const char* scrollview_path = getenv("SCROLLVIEW_PATH");
409
if (scrollview_path == nullptr) {
410
#ifdef SCROLLVIEW_PATH
0 commit comments