Toggle the state before handling the message. I think this implies there is some re-entrancy here that i am not handling correctly, but this fixes an issue with vscode-python (for now)
This commit is contained in:
parent
67f7402581
commit
e80c874e3b
1 changed files with 5 additions and 5 deletions
|
|
@ -199,11 +199,11 @@ class DebugAdapterConnection( object ):
|
|||
|
||||
self._logger.debug( 'Message received: {0}'.format( message ) )
|
||||
|
||||
try:
|
||||
self._OnMessageReceived( message )
|
||||
finally:
|
||||
# Don't allow exceptions to break message reading
|
||||
self._SetState( 'READ_HEADER' )
|
||||
# We read the message, so the next time we get data from the socket it must
|
||||
# be a header.
|
||||
self._SetState( 'READ_HEADER' )
|
||||
self._OnMessageReceived( message )
|
||||
|
||||
|
||||
def _OnMessageReceived( self, message ):
|
||||
if not self._handler:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue