diff --git a/src/network/bmproto.py b/src/network/bmproto.py index fc6ee92d..b5ae9daf 100644 --- a/src/network/bmproto.py +++ b/src/network/bmproto.py @@ -542,10 +542,15 @@ class BMProto(AdvancedDispatcher, ObjectTracker): if not ua_valid: self.userAgent = '/INVALID:0/' if not self.isOutbound: + common_streams = self.streams.intersection( + connectionpool.BMConnectionPool().streams) + try: # leave one because of bug in decode_payload_content() + common_streams = [min(common_streams)] + except ValueError: + common_streams = [1] self.append_write_buf(protocol.assembleVersionMessage( self.destination.host, self.destination.port, - connectionpool.BMConnectionPool().streams, True, - nodeid=self.nodeid)) + common_streams, True, nodeid=self.nodeid)) logger.debug( '%(host)s:%(port)i sending version', self.destination._asdict())