Ticket #9057: remotefile_deadlock.diff
File remotefile_deadlock.diff, 1.0 KB (added by , 14 years ago) |
---|
-
mythtv/libs/libmythdb/remotefile.cpp
163 163 QString(", error was %1").arg(strlist[1]) : 164 164 QString(", remote error"))); 165 165 } 166 167 // Close the sockets if we received an error so that isOpen() will168 // return false if the caller tries to use the RemoteFile.169 Close();170 166 } 171 167 172 168 return lsock; … … 176 172 { 177 173 QMutexLocker locker(&lock); 178 174 controlSock = openSocket(true); 175 if (!controlSock) 176 return false; 177 179 178 sock = openSocket(false); 180 return isOpen(); 179 if (!sock) 180 { 181 // Close the sockets if we received an error so that isOpen() will 182 // return false if the caller tries to use the RemoteFile. 183 locker.unlock(); 184 Close(); 185 return false; 181 186 } 187 return true; 188 } 182 189 183 190 void RemoteFile::Close(void) 184 191 {