comparison mercurial/wireprotoframing.py @ 37656:e6870bca1f47

wireprotoframing: record when new stream is encountered Without this, we choke after receiving the 2nd frame in a stream. Not sure how we made it this far without finding this bug. Differential Revision: https://phab.mercurial-scm.org/D3334
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 13 Apr 2018 12:49:47 -0700
parents b9502b5f2066
children 89a16704114c
comparison
equal deleted inserted replaced
37655:b9502b5f2066 37656:e6870bca1f47
1027 return 'error', { 1027 return 'error', {
1028 'message': _('received frame on unknown stream ' 1028 'message': _('received frame on unknown stream '
1029 'without beginning of stream flag set'), 1029 'without beginning of stream flag set'),
1030 } 1030 }
1031 1031
1032 self._incomingstreams[frame.streamid] = stream(frame.streamid)
1033
1032 if frame.streamflags & STREAM_FLAG_ENCODING_APPLIED: 1034 if frame.streamflags & STREAM_FLAG_ENCODING_APPLIED:
1033 raise error.ProgrammingError('support for decoding stream ' 1035 raise error.ProgrammingError('support for decoding stream '
1034 'payloads not yet implemneted') 1036 'payloads not yet implemneted')
1035 1037
1036 if frame.streamflags & STREAM_FLAG_END_STREAM: 1038 if frame.streamflags & STREAM_FLAG_END_STREAM: