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

InternalStreamConnection.openAsync leaks exception instead of passing it to callback

      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. 

        1. stackTrace
          6 kB
          Sahil Anand

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

              Created:
              Updated:
              Resolved: