Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3852

InternalStreamConnection.openAsync leaks exception instead of passing it to callback

    XMLWordPrintable

Details

    Description

      There seems to be a bug in  

       

      com.mongodb.internal.connection.InternalStreamConnection.openAsync

       

      // code placeholder
      public void openAsync(final SingleResultCallback<Void> callback) {
          ..
          try {
              ..
          } catch (Throwable t) {
             ...
          }
          stream.openAsync(new AsyncCompletionHandler<Void>() {
            ..........
          });
      }
      

       

      stream.openAsync is not error handled properly and when this blows up there is no callback. This is causing unexpected error on our side which cannot be handled.

      The error usually is 
      com.mongodb.MongoSocketException: ......: System error
       

      I have attached a stack trace I could provide. 

      Attachments

        Activity

          People

            jeff.yemin@mongodb.com Jeffrey Yemin
            sahilanand1025@gmail.com Sahil Anand
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: