Handle case where remote node is interested in stream 0 (shouldn't happen naturally)
This commit is contained in:
parent
c0178c3aed
commit
d3ef469c5f
|
@ -1796,16 +1796,16 @@ class receiveDataThread(QThread):
|
||||||
printLock.acquire()
|
printLock.acquire()
|
||||||
print 'Remote node useragent:', useragent, ' stream number:', self.streamNumber
|
print 'Remote node useragent:', useragent, ' stream number:', self.streamNumber
|
||||||
printLock.release()
|
printLock.release()
|
||||||
#If this was an incoming connection, then the sendData thread doesn't know the stream. We have to set it.
|
|
||||||
if not self.initiatedConnection:
|
|
||||||
broadcastToSendDataQueues((0,'setStreamNumber',(self.HOST,self.streamNumber)))
|
|
||||||
if self.streamNumber != 1:
|
if self.streamNumber != 1:
|
||||||
self.sock.close()
|
self.sock.close()
|
||||||
printLock.acquire()
|
printLock.acquire()
|
||||||
print 'Closed connection to', self.HOST, 'because they are interested in stream', self.steamNumber,'.'
|
print 'Closed connection to', self.HOST, 'because they are interested in stream', self.streamNumber,'.'
|
||||||
printLock.release()
|
printLock.release()
|
||||||
self.data = ''
|
self.data = ''
|
||||||
return
|
return
|
||||||
|
#If this was an incoming connection, then the sendData thread doesn't know the stream. We have to set it.
|
||||||
|
if not self.initiatedConnection:
|
||||||
|
broadcastToSendDataQueues((0,'setStreamNumber',(self.HOST,self.streamNumber)))
|
||||||
if self.data[96:104] == eightBytesOfRandomDataUsedToDetectConnectionsToSelf:
|
if self.data[96:104] == eightBytesOfRandomDataUsedToDetectConnectionsToSelf:
|
||||||
self.sock.close()
|
self.sock.close()
|
||||||
printLock.acquire()
|
printLock.acquire()
|
||||||
|
|
Reference in New Issue
Block a user